Visual Studio附加调试器时出错

发布于 2024-11-30 12:33:49 字数 2864 浏览 1 评论 0原文

我刚刚设置我的机器在 Visual Studio 2010 中编码 Windows Azure 应用程序。我有一台机器正在工作,运行良好。机器都是64位Windows 7。我在工作中以管理员身份运行。在家里,我以普通用户身份安装了大部分 VS 和 .NET 组件,但我现在以管理员身份运行所有内容,因为我认为可能存在一些与此相关的错误。

使用一个 Web 角色创建一个标准 Azure 项目会给我带来以下好处:

“将调试器附加到 IIS 工作进程时出错 对于角色实例“xyz”的 URL http://127.0.0.1:5100/...”。

我搜索了 Google 24 小时并尝试了大部分解决方案,但没有一个对我有用:

http://127.0.0.1:5100/debugattach.aspx 
状态代码=403(禁止)协议版本=1.1 缓存=False
内容长度=53 内容类型=text/html;字符集=utf-8 
日期 = 2011 年 8 月 19 日星期五 20:16:48 GMT 服务器 = Microsoft-IIS/7.5
X-Powered-By=ASP.NET
/debugattach.aspx-应用程序调试未激活。

当我注释掉 ServiceDefinition.csdef 中的 Sites-Tag 时,出现以下错误:

“无法识别的属性‘targetframework’。请注意属性名称 区分大小写”

这里我也尝试了网上能找到的大多数解决方案:

  • IIS-Manager中设置正确的.NET-Framework版本(所有应用程序池都设置为4.0,启动项目时,错误页面显示framework 2.0不过,我可以在哪里更改它?)
  • 安装最新的.NET-Framework,我有 4.0.30319

它们都不起作用。

如果您有任何建议,我会尝试并在这篇文章中列出我的结果。

I just set up my machine to code Windows Azure apps in Visual Studio 2010. I have a machine at work, which works fine. The machines are both 64-bit Windows 7. I run as administator at work. At home I installed most of the VS and .NET components as normal user, but I'm running everything now as administrator, because I assume there could be some errors correlating to that.

Creating a standard Azure project with one web role gives me this:

"there was an error attaching the debugger to the IIS worker process
for URL http://127.0.0.1:5100/ for role instance 'xyz'...".

I searched Google 24 hours and tried most of the solutions, but none worked for me:

http://127.0.0.1:5100/debugattach.aspx 
Status code=403 (Forbidden) Protocol version=1.1 Cached=False
Content-Length=53 Content-Type=text/html; charset=utf-8 
Date=Fri, 19 Aug 2011 20:16:48 GMT Server=Microsoft-IIS/7.5
X-Powered-By=ASP.NET
/debugattach.aspx-application debugging not activated.

When I comment out the Sites-Tag in the ServiceDefinition.csdef I get the following error:

"unrecognized attribute 'targetframework'. note that attribute names
are case-sensitive"

Here I also tried most solutions to be found on the internet:

  • setting the right .NET-Framework version in IIS-Manager (all application pools are set to 4.0, when starting the project, the error page shows framework 2.0 though, where can I change it?)
  • installing the newest .NET-Framework, I have 4.0.30319

None of them work.

If you have any advice, I will try it and list my result in this post.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

故人爱我别走 2024-12-07 12:33:49

我收到此消息是由于天蓝色项目的属性设置不正确。

我必须将设置从 IIS Webserver 更改为 IIS Express

输入图像此处描述

I was getting this due the the properties on the azure project being set up incorrectly.

I had to change the setting from IIS Webserver to IIS Express

enter image description here

生寂 2024-12-07 12:33:49

首先要问的问题是您在家运行的是哪个版本的 Windows 7?我将冒险猜测它是家庭高级版,而在工作中你运行专业版。

问题是,对于 Home Premium(较低版本),您无法选择安装必要的组件以便能够在 IIS 中进行调试。要确认这一点,请在您的工作计算机上转到“控制面板”->“程序和功能 -> “打开或关闭 Windows 功能”并查看 IIS 选项。在那里你会看到比在家里更多的东西。

我在 MS 文档中没有发现任何关于 Windows 7 各个版本之间差异的地方都是这种情况。不过,我很高兴有人能纠正我这一点。

要解决此问题,请在在家运行时将项目更改为使用 Visual Studio Development Server 运行(右键单击您的项目 -> 属性 -> Web),并确保在签入之前将其更改回使用 IIS你的代码。

或者您可以随时购买 Windows 升级到专业版。

The first question to ask is which version of Windows 7 are you running at home? I'm going to go out on a limb and guess that it's Home Premium and at work you run Professional.

The catch is that with Home Premium (an lesser edtions) you don't have the option to install the necessary components to be able to debug in IIS. To confirm this, on your work computer go to Control Panel -> Programs and Features -> "Turn Windows features on or off" and have a look under the IIS option. You'll see more there than you do at home.

I have not found anywhere in the MS documentation on the differences between various editions of Windows 7 that this is the case. I'd be happy for someone to correct me on this though.

To get around this issue is while running at home to change the project to run with Visual Studio Development Server (right click your project -> Properties -> Web) and make sure that you change it back to using IIS before you check in your code.

Or you can buy an anytime upgrade for windows to Professional.

那小子欠揍 2024-12-07 12:33:49

遇到了同样的错误,并通过更改 IIS 中应用程序池的默认值来修复它。

  • 启动 iis 管理器
  • 选择应用程序池
  • 在右侧的“操作”面板中,单击“设置应用程序池默认值”
  • 将 .NET Framework 设置为 4.0
  • 可选:将启用 32 位应用程序设置为 true

Got the same error and fixed it by changing the defaults for the app-pools in IIS.

  • Start iis manager
  • Select application pools
  • On the right side, in the 'Actions' panel click on 'Set application pool defaults'
  • Set .NET framework to 4.0
  • OPTIONAL : Set Enable 32-bit applications to true
哭泣的笑容 2024-12-07 12:33:49

这对我有用:

转到 IIS ->默认网站->绑定

将默认 http 端口设置回 80。

This worked for me:

Go to IIS -> default web site -> bindings

Set the default http port back to 80.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文