我不想從另一個答案竊取任何信貸,但我想闡述一下我的意見。我重新安裝了Visual Studio(我知道的很長時間)並且仍然存在問題。看起來,當用於AI的HTTP模塊加載到IIS Express時,事情往往會南下,所以我不得不求助於在運行發行版配置時加載這些模塊。
這意味着更新你的web.config刪除AI的語句,而是將它們移動到Web.Release.config的轉變,所以當釋放的結構是建立他們裝:
https://stackoverflow.com/a/27923364/571237
但請注意,自答案發布以來,程序集已發生變化。以下是我需要添加的內容:
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
<httpModules>
<!-- Enable application insights when running in release mode (it don't work right locally...) -->
<!-- https://stackoverflow.com/a/27923364/571237 -->
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"
xdt:Transform="Insert"/>
</httpModules>
</system.web>
<system.webServer>
<modules>
<!-- Enable application insights when running in release mode (it don't work right locally...) -->
<!-- https://stackoverflow.com/a/27923364/571237 -->
<remove name="ApplicationInsightsWebTracking" xdt:Transform="Insert"/>
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" xdt:Transform="Insert" />
</modules>
</system.webServer>
我得到相同的行爲,但此修復程序不適用於我。我可以在Visual Studio中提供幾個請求,然後整個應用程序掛起。我無法停止調試或任何事情。想想我現在只是會推出應用程序洞察。 –
查看我編輯的真正修復:-) –