启动本地azure项目时调试器无法连接

发布于 2025-01-08 00:25:26 字数 772 浏览 1 评论 0原文

好的,首先;这就是我所做的:

  1. 安装 AZURE 工具
  2. 重新启动
  3. 启动 Visual Studio - 新的 Azure 项目
  4. 添加 Web 角色(asp.net MVC 4 beta Web 角色)
  5. 按 F5(调试)

它启动存储模拟器和计算模拟器并开始在运行时加载,然后我收到一个弹出窗口,提示调试器无法连接。

Problem

然后经过一些谷歌搜索后,建议我尝试运行应用程序而不运行调试器看看我是否可以访问该应用程序。当我这样做时,我得到这个:

Problem

所以我认为 IIS 没有权限访问某些文件/目录。因此,我转到 IIS 并查找运行该应用程序的应用程序池,它告诉我正在使用的身份是 NetworkService,然后我授予 NetworkService 对 IIS 为该应用程序设置的整个文件夹的完全权限(这也会发生)是项目目录的路径)。我仍然遇到同样的错误。现在我或多或少没有想法,但我尝试了最后一件事,即也给予 IUSR 对同一目录的完全权限,但这也没有帮助。

我该如何解决这个问题?我还没有尝试将我的项目实际启动到 Azure,因为如果我什至无法让它在开发中工作,我看不出有什么意义。任何和所有的帮助将不胜感激。

Ok, first of; here's what I did:

  1. Install AZURE tools
  2. Reboot
  3. Start Visual Studio - new Azure project
  4. Add web role (asp.net MVC 4 beta web role)
  5. Hit F5 (debug)

It starts up the storage emulator and the compute emulator and starts to load in runtimes, and then I get a popup saying that the debugger couldn't connect.

Problem

Then after some googeling I'm suggested to try to run the application without running the debugger to see if I can acces the application. When I do I get this:

Problem

So I figure that IIS does not have permissions to access some file/directory. So I go to IIS and look up the application pool running the app, and it tells me that the identity in use is NetworkService, then I go give NetworkService full permissions to the entirety of the folder IIS has set for the application (which also happens to be the path to the project dir). Still I get the same error. Now I'm more or less out of ideas, but I try one last thing, which is to also give IUSR full permissions to the same dir, but this did not help either.

How can I go about resolving this problem? I haven't tried actually launching my project to Azure yet, cause if I can't even get it to work in development I don't see much point. Any and all help would be appreciated.

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

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

发布评论

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

评论(5

爱的那么颓废 2025-01-15 00:25:26

今天,我在卸载 .NET 4.5/Visual Studio 11 Dev Preview,然后安装 ASP.NET MVC 4 Beta(这是在 2 月 29 日更新的 VS 2011 Preview 发布之前)后遇到了同样的错误。

由于我卸载了 .net 4.5,因此您只需要执行“aspnet_regiis -i”即可确保使用 IIS 7.x 设置 .net 框架 (4.0),这对我有用。

编辑:如果您卸载/然后手动安装 Visual Studio 2012 RTM,这也将起作用。

I ran into the same error today after uninstalling .NET 4.5/Visual Studio 11 Dev Preview, then installing ASP.NET MVC 4 Beta (this is before Feb 29th when the updated VS 2011 Preview drops).

Since I uninstalled .net 4.5, you just need to do an "aspnet_regiis -i" to ensure the .net framework (4.0) is set up with IIS 7.x this worked for me.

Edit: This will work if you uninstall/then manually install Visual Studio 2012 RTM as well.

霊感 2025-01-15 00:25:26

我昨天也遇到了类似的错误。对我来说,问题是目标文件夹中的构建输出为空。

我试图回答类似的问题https://stackoverflow.com/a/9411422/182371

  • 检查%UserProfile%\AppData\Local\dftmp\IISConfiguratorLogs\IISConfigurator.log
    错误消息的文件。模式详细信息位于
    https://stackoverflow.com/a/8432621/182371

  • 确保项目的构建输出不为空。您可以通过转到 IIS 来完成此操作,找到名称类似于以下内容的站点
    “deployment16(6).WindowsAzureProject2.WebApplication3_IN_0”,右侧
    点击-->探索....确保该文件夹不为空并且
    包含成功启动网络项目所需的所有文件。

至于“拒绝访问”错误:

  • 它可能只是 IIS 默认设置,用于禁用浏览。要解决此问题,只需导航到 IIS 中的该网站,找到“目录浏览”图标,然后按“启用”。您至少会看到该目录中的文件。

  • 不仅尝试 127.0.0.1:81,还尝试该文件夹内的特定文档,例如 127.0.0.1:81/Default.aspx

  • 考虑到有时会出现一些混乱的事实与端口。您在错误消息中看到它是端口 82,但在浏览器中它是端口 81。因此,请确保您使用正确的端口。或者,更好的是,在您的服务定义中尝试使用一些非标准端口来避免重新映射。

I had a similar error yesterday. For me the problem was that the output of the build was empty in the target folder.

I tried to answer a similar question https://stackoverflow.com/a/9411422/182371:

  • Check %UserProfile%\AppData\Local\dftmp\IISConfiguratorLogs\IISConfigurator.log
    file for the error messages. Mode details at
    https://stackoverflow.com/a/8432621/182371

  • 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.

As for the Access Denied error:

  • it could be just an IIS default setting to disable browsing. To resolve that, just navigate to that web site in IIS, find Directory Browsing icon, and press Enable. You will at least see the files inside that directory.

  • Also try not only 127.0.0.1:81, buta specific document inside that folder, like 127.0.0.1:81/Default.aspx

  • Take into account the fact that there's sometimes some mess with the ports. You see that in the error message it's port 82, but in your browser it's port 81. So make sure you're using the right port. Or, even better, in your service definition try to use some non-standard port for this to avoid remapping.

许一世地老天荒 2025-01-15 00:25:26

我遇到了同样的问题。最后,我不得不重新安装 IIS 7。

I've met the same issue. In the end, I had to reinstall IIS 7.

命硬 2025-01-15 00:25:26

我遇到了完全相同的错误,并尝试重新安装 IIS 和 Azure SDK - 没有任何效果。

最终追踪到“IIS URL 重写模块 2”。我进入控制面板并选择修复并解决了问题。如果您的 web.config 中有一个部分,那么这可能就是原因。

I got this exact same error and tried a re-install of IIS and the Azure SDK - nothing worked.

Eventually tracked it down to the "IIS URL Rewrite Module 2". I went to the Control Panel and chose Repair and it resolved it. If you have a section in your web.config then this might be the cause.

稚然 2025-01-15 00:25:26

按照 http://www.microsoft.com/en 中的步骤 11 进行操作-us/download/details.aspx?id=35448。从 2011 年升级到 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 when upgraded from 2011.

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