【发布时间】:2011-04-19 14:04:41
【问题描述】:
我正在通过 godaddy.com 托管一个网站,这是链接:
http://floridaroadrunners.com/
这是我的 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="ApplicationServices"
connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="2880" />
</authentication>
<customErrors mode="Off"/>
<membership>
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices"
enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
applicationName="/" />
</providers>
</membership>
<profile>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
</providers>
</profile>
<roleManager enabled="false">
<providers>
<clear/>
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
</providers>
</roleManager>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
我收到运行时错误:
运行时错误
描述:应用程序错误 发生在服务器上。目前的 为此的自定义错误设置 应用程序防止的细节 被查看的应用程序错误 远程(出于安全原因)。它 但是,可以通过浏览器查看 在本地服务器机器上运行。
我还设置了 customErrors mode = "off"。这里有什么问题?我正在使用带有 4.0 框架的 Visual Studio 2010。谢谢!
【问题讨论】:
-
我编辑了我的问题。请看!
-
您确定在服务器上提交了 customErrors off 吗?如果模式真的关闭,您应该会看到错误。
-
当我遇到这种情况时,总是由于web.config格式本身的错误导致无法解析配置。您发布的内容看起来不错,所以我不知道...
标签: c# asp.net web-hosting web-deployment