gpt4 book ai didi

asp.net - Azure 不会关闭自定义错误

转载 作者:行者123 更新时间:2023-12-03 06:02:46 25 4
gpt4 key购买 nike

我正在将客户端站点迁移到 Azure VM(暂时停止,直到我们重写以迁移到 Azure Proper)。我遇到的问题是某个地方有问题,但我看不到它是什么。当我运行该网站时,我遇到了通常的蓝屏死机...

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 tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".

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 configuration tag to point to a custom error page URL.

我以前在这种情况下遇到过很多次,所以我编辑了 web.config 文件,使其看起来像这样......

<system.web>
<customErrors mode="Off" />
(other stuff)
</system.web>

...并且出现了同样的消息。我回收了应用程序池,甚至重新启动了 IIS,但我仍然收到相同的消息,就好像虚拟机不关心我在配置文件中放入的内容一样。

我已将“localhost”添加到绑定(bind)中,以便我可以直接在服务器上查看它,然后我得到了这个...

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: An error occurred loading a configuration file: Directory 'C:\inetpub\wwwroot\test.siansplan.com\config' does not exist. Failed to start monitoring file changes.

Source Error:

[No relevant source lines]

Source File: C:\inetpub\wwwroot\test.siansplan.com\web.config Line: 0

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18447

以前有其他人遇到过这个问题吗?

我不知道该怎么办。

最佳答案

我找到了这个问题的答案。 web.config 文件引用了不存在的子文件。如果您不能使用基于本地主机的调试,这将是一个很大的问题。

关于asp.net - Azure 不会关闭自定义错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23565466/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com