【发布时间】:2013-05-25 16:10:26
【问题描述】:
我正在尝试发布我的 ASP.NET 网站。 我有一个后端功能,一个 WCF 服务(我认为这不是问题,因为我可以在调试等中访问它)
问题是我将这个网站发布到 WebHotel,这就像一个魅力。 发布后,我可以浏览到网站的起始页。但是当我点击提交按钮(登录)时。 它会引发错误(请参阅帖子底部)。
webconfig 中的 CustomError 标记多次更改为“Off”、“On”和“RemoteOnly”。 它根本没有显示任何特定的错误。
同样的项目以前工作过,但突然出现了。就像乐透一样。
我还捕获了应用程序和 WCF-Service 中的任何错误并将其存储在数据库中,但这些错误都没有出现。
有什么想法吗?
不知道这是否重要,但我在该域的子域上有另一个 ASP.NET 页面。
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 似乎 以表明这一点(因为“父”网络配置)是由子应用程序“继承”的,您关于没有看到任何错误的评论。但这是一种猜测,任何人要提供有用的输入,您需要提供更多。
-
子域应用未连接到主域。但是这两个站点使用相同的 DB 和 WCF-Service。实际上,这两个站点(子站点和主站点)是两个独立的项目。我现在无法控制主项目。 (我在子域上工作)。
-
仍然不清楚 - 我假设您的意思是它们是完全独立的 ASP.net 应用程序。如果是这样,更改您的 web.config 以显示错误应该会为您提供详细的错误信息,该论坛甚至需要开始提供帮助。猜测是所有可以在没有调试信息的情况下完成的。
-
我将 CustomError 标记设置为“关闭”==“所有调用者都会收到完整的异常信息。” (MSDN) 我打电话给另一个在主域上工作的人。他说他也将 CustomErrors 设置为“关闭”。现在我已经发布了一个新的 WCF 服务,也启用了 customerrors,但我仍然没有得到任何故障细节。我想知道它是否与Webhotel-host有关?
标签: asp.net runtime-error publish