嗨,专家们你们好吗?我是学生,使用 sql server 2005 学习 asp.net c# visual studio 2010。我开发了一个有数据库的网站。我在互联网的帮助下通过自学开发了这个网站。该网站已完成并在我的计算机上完美运行。
我已经注册了托管服务器和域名。
问题是当我上传我的网站时它在那里不起作用并显示以下错误:
Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
我在互联网的某个地方读到,在将网站上传到托管服务器之前,我必须配置我的 web.config 文件。在我的网站 web.config 文件中默认有以下信息,
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<connectionStrings>
<add name="SPConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ShoppingPortal.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<trace enabled="true" localOnly="false" pageOutput="true" />
<compilation debug="true" targetFramework="4.0"/>
</system.web>
</configuration>
我不知道我应该在其中编辑什么才能让它在托管服务器上工作,请在这方面帮助我,我应该怎么做。先感谢您