调试 Azure:将调试器附加到 IIS 工作进程时出错
我有一个要部署到 Windows Azure 的 Web 应用程序 asp.net。我尝试首先在本地运行它。但是在调试时,我从 VS2010 中发现了这个错误:
"There was an error attaching the debugger to the IIS worker process
for URL 'http://127.255.0.0:82/' for role instance
'deployment16(6).WindowsAzureProject2.WebApplication3_IN_0'.
Unable to start debugging on the web server ......."
我非常努力地寻找这个问题的解决方案,但似乎没有什么对我有用。我是Windows Azure的新手,这对我来说确实是一个大麻烦。
I have a web application asp.net to deploy to Windows Azure. I try to run it on local first. But when debugging, I catch this error from VS2010:
"There was an error attaching the debugger to the IIS worker process
for URL 'http://127.255.0.0:82/' for role instance
'deployment16(6).WindowsAzureProject2.WebApplication3_IN_0'.
Unable to start debugging on the web server ......."
I've search so hard to find the solution for this problem but there's nothing seems work for me. I'm a newbie in Windows Azure, it's really a big trouble with me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
当尝试将应用程序启动到计算模拟器中时,我在 Windows 8 上遇到了类似的问题,使用 Visual Studio 2012 RTM 和 Azure SDK 1.71 调试云应用程序。这是一个非常简单的应用程序,但我使用了 Azure 诊断。最后,我更改了两件事,对我有用,都打开了 Windows 8 功能(因此转到 Win8 并打开“打开/关闭 Windows 功能”。
激活以下复选框:
互联网信息服务托管Web 核心
互联网信息服务> 万维网服务> ASP。网4.5
互联网信息服务>服务 > 健康和诊断 > 追踪
互联网信息服务> 网页管理工具> IIS 管理脚本和工具
这对我有用,很有意义,因为我正在使用 Visual Studio 2012 并尝试使用 Azure 中的诊断来获取一些跟踪信息。
我希望这对您有用或提供有关该问题的一些提示。如果信息有用,请记得投票作为回应或价值提示。
谢谢,
迈克
I had similar problem with Windows 8, debuging a cloud application with Visual Studio 2012 RTM and Azure SDK 1.71, when trying to launch the application into the compute emulator. It was a very simple app, but I used Azure diagnostics. At the end these are two things I have changed that have work for me, both turning on Windows 8 features (so go to Win8 and open 'Turn Windows Features On/Off'.
Activate the checkboxes for:
Internet Information Services Hostable Web Core
Internet Information Services > World Wide Web Services > Application Development Features > ASP.NET 4.5
Internet Information Services > World Wide Web Services > Health and Diagnostics > Tracing
Internet Information Services > Web Management Tools > IIS Management Scripts and Tools
That worked for me, it makes sense, as I'm using Visual Studio 2012 and trying to get some trace information using diagnostics in Azure.
I hope this will work for you or give some tip about the problem. In the case of being useful information, remember to vote as response or as value tip.
Thanks,
Mike
当要部署到模拟器的项目(在您的情况下为
WindowsAzureProject2
)出现问题时,通常会发生这种情况。请尝试以下操作:
检查%UserProfile%\AppData\Local\dftmp\IISConfiguratorLogs\IISConfigurator.log 文件中是否有错误消息。请参阅此答案了解更多详细信息。
确保您的项目可以在没有模拟器的情况下启动。这是一个 Web 项目,因此只需尝试将其作为常规 Web 项目启动即可。或者将其发布到单独的文件夹并尝试在 IIS 中创建一个网站。
检查您的
*.csdef
和*.cscfg
文件,确保所有配置均正确。确保项目的构建输出不为空。为此,您可以转到 IIS,找到名称类似于
deployment16(6).WindowsAzureProject2.WebApplication3_IN_0
的站点,右键单击 -->探索...
。确保此文件夹不为空,并且包含成功启动 Web 项目所需的所有文件。顺便说一句,有一个类似的问题: Debugger can't connect when running local azure项目
This usually happens when there's a problem with the project to be deployed to the emulator (
WindowsAzureProject2
in your case).Try the following:
Check %UserProfile%\AppData\Local\dftmp\IISConfiguratorLogs\IISConfigurator.log file for the error messages. See more details in this answer.
Make sure your project can be started without the emulator. It's a web project, so just try to start it as a regular web project. Or publish it to the separate folder and try to create a website in IIS of it.
Check your
*.csdef
and*.cscfg
files to make sure all the configuration is correct.Make sure that the build output of your project is not empty. You can do this by going to IIS, find the site with the name similar to
deployment16(6).WindowsAzureProject2.WebApplication3_IN_0
, right click -->Explore...
. Make sure that this folder is not empty and contains all the files required to start a web project successfully.BTW, there's a similar question: Debugger can't connect when starting local azure project
按照 http://www.microsoft.com/en-us/download/ 中的步骤 11 进行操作详细信息.aspx?id=35448。使用 2012 年 10 月的 SDK 在 Windows 8 上为我工作
Follow step 11 from http://www.microsoft.com/en-us/download/details.aspx?id=35448. Worked for me on Windows 8 with Oct 2012 SDk
我今天刚刚尝试在 Windows 7 中使用 Azure 存储模拟器进行本地调试时遇到同样的问题。因此,在 Azure 项目属性的 Web 选项卡中,我选中了单选按钮“使用 IIS Express”,并且调试没有问题。我希望这对某人有帮助。
I just have today the same problem trying to Debug locally with Azure Storage Emulator in Windows 7. So in the Azure project properties, in Web tab, I checked the radio button 'Use IIS Express' and it debugged without problem. I hope this helps someone.
当我将现有的 Azure 解决方案升级到 Azure SDK 2.1 时,我遇到了完全相同的问题。经过一番搜寻后,我发现升级已自动将“本地开发服务器”设置设置为“使用 IIS Web 服务器”。
将“本地开发服务器”设置更改为“使用 IIS Express”立即解决了问题。
要访问此设置,请右键单击 Azure 云在解决方案中打开项目文件,选择“属性”选项,向下切换到“Web”,您将看到以下设置。
I encountered this exact same problem when I upgraded an existing Azure solution to the Azure SDK 2.1. After some hunting around I uncovered that the upgrade had automatically set the "Local Development Server" setting to "Use IIS Web Server".
Changing the "Local Development Server" setting to "Use IIS Express" fixed the problem immediately.
To access this setting right-click the Azure cloud project file in your solution, select the "Properties" option, tab down to "Web" and you'll see the following setup.
另外,请确保您以管理员身份运行 Visual Studio
Also, make sure you run Visual Studio as administrator
请检查您安装的模拟器版本。如果您的代码是在较旧的 sdk 中创建的,并且您安装了新的模拟器,则会出现此错误。
Please check the version of emulator you have installed. If your code is created in older sdk and you have a new emulator installed it will give you this error.
检查项目中 Azure API 的版本,转到“项目”>“参考并右键单击 Azure dll 以检查版本,系统上必须安装相同的 sdk 版本,更高版本是可选的,因为 azure 2.x 不向后兼容。
Check the version of Azure APIs in your project, go to Project > references and right click on Azure dlls to check the version, same sdk version must be installed on the system, higher are optional as azure 2.x are not backward compatible.