如何在somee.com上部署ASP.net网站?
我正在尝试使用免费托管在somee.com上部署示例网站。如何在somee.com上部署ASP.net网站?
首先我将我的网站发布为一个文件夹。我已经在本地机器上的IIS 7上的本地机器上进行了测试。这工作正常,没有任何问题。
我创建了somee.com新的免费托管域,然后在文件管理器 - >
2.然后我做一个压缩文件夹,我的网站上公布的文件夹
然后我上传的zip文件夹并选择上传并解压缩档案
4.现在,这是我的根文件夹中的文件结构
5.我希望它会运行default.aspx
文件。然后我尝试访问我的网站,它抛出错误,如下面
错误味精
Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0016: Could not write to output file 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\b2d18bbc\3889fee\App_Web_home.master.cdcab7d2.cugbgmun.dll' -- 'Access is denied. '
Source Error:
[No relevant source lines]
注意
I created one small
default.htm
file for testing. If I upload that file. That's working fine.
的Web.config文件
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<customErrors mode="Off"/>
<compilation targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
</configuration>
如果我添加Default.aspx文件作为启动页的Web配置如下图所示,
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<add value="Default.aspx" />
</files>
</defaultDocument>
</system.webServer>
<system.web>
<customErrors mode="Off"/>
<compilation targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
</configuration>
错误味精
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
下面是步骤,将您的.NET发布到服务器:
- 请使用Visual Studio工具打开您的项目
- 在解决方案资源管理器窗口(通常位于VS工具的右上角)上,右键单击您的项目并选择发布
- 请将其发布到本地文件夹,例如C:\ Project
- 请将您在C:\ Project上看到的任何文件/文件夹通过FTP上传到服务器,您的网站将正常工作。
这些步骤将保持不变。如果您面临500内部服务器错误,请询问对方以检查服务器上的完整错误消息。
OP * did *提到了“* published *网站文件夹”,所以可能这已经完成了 –
在您添加默认文档的Web配置的上一个版本中,您有索引。aspx而不是default.aspx。这是一个错字还是你的问题? – Bearcat9425
@ Bearcat9425对不起,我忘了改变我的问题。但在我的web.config文件中,它只有default.aspx的名字 –