簡體   English   中英

Visual Studio .NET 項目在更新后崩潰

[英]Visual Studio .NET project is crashing after an update

我更新了我的 Visual Studio 並且我正在處理一個 C#/.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>

我不確定為什么會發生這種情況,但我猜這與 Visual Studio 的新版本有關,我必須在我的項目中手動更改一些顯示它正在運行最新版本。 有人有什么猜測嗎?

這不是 Visual Studio 的問題,而是您網站內部的問題。 要查看從mode="Off"更改為mode="On"並重新啟動您的網站會發生什么:

<configuration>
    <system.web>
        <customErrors mode="On" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM