在Windows 8上的Windows Azure SDK 1.8模拟器上进行调试不起作用

时间:2012-11-08 15:34:35

标签: asp.net azure azure-web-roles

每当我在Visual Studio中点击调试时,它都会将网站部署到IIS / Compute Emulator中,并提供以下消息:

  

将调试器附加到IIS工作进程时出错   用于角色实例的URL“http://127.255.0.0:82/”   'deployment18(521).TestApp.Azure.Website1.Web.UI_IN_0'。无法   在Web服务器上开始调试。无法启动ASP.NET调试。   无需启动项目即可获得更多信息   调试。

然后,当我查看调试器日志时,它说:

http://127.255.0.0:82/debugattach.aspx
----------------------------------------------------------------------
Status code=417 (Expectation Failed)
Protocol version=1.1
Cached=False
Content-Length=60
Cache-Control=private, no-transform
Content-Type=text/html
Date=Thu, 08 Nov 2012 14:52:08 GMT
----------------------------------------------------------------------
The page cannot be displayed because the expectation failed.

有没有人有任何想法?

1 个答案:

答案 0 :(得分:2)

使用失败的请求跟踪后,我能够看到我的应用程序初始化(Web-AppInit)(IIS 8.0中的新初始化功能)配置使调试失败。

所以消息是:如果您有preloadEnabled和applicationInitialization配置部分,请不要期望能够调试您的Web应用程序:

 <applicationInitialization doAppInitAfterRestart="true" remapManagedRequestsTo="loading.html" skipManagedModules="true">
      <add initializationPage="/" />
    </applicationInitialization>

我将把它放到web.release.config文件中,这样它才能在生产中生效。