无法在web服务器上启动调试。无法开始ASP。NET调试VS 2010, II7, Win 7 x64。

时间:2022-09-03 20:03:04

I am running Visual Studio 2010 (as Admin), IIS 7 on Windows 7 x64. I am able to run the ASP.NET web site in IIS 7 without debugging just fine, but when I press F5 to debug it, I get:

我正在运行Visual Studio 2010(作为Admin), iis7在Windows 7 x64上。我可以运行ASP。在IIS 7中没有调试的NET web站点没有调试,但是当我按F5调试它时,我得到:

Unable to start debugging on the web server. Could not start ASP.NET debugging. More information may be available by starting the project without debugging.

无法在web服务器上启动调试。无法开始ASP。网络调试。在不进行调试的情况下启动项目可以获得更多的信息。

Unfortunately the help link is not helping me much and leads down a heck of a large tree of things.

不幸的是,帮助链接并没有帮到我很多,反而导致了一大堆事情。

I checked the following:

我检查以下:

  • Security requirements — I don't recall having to do anything special before. The worker process in IIS7 is w3wp.exe. It says that if it's running as ASPNET or NETWORK SERVICE I must have Administrator privileges to debug it. How do I find out if I need to change something here?

    安全要求-我不记得以前做过什么特别的事情。IIS7的工作流程是w3wp.exe。它说,如果它以ASPNET或网络服务的形式运行,那么我必须有管理员特权来调试它。我怎么知道我需要改变什么?

  • Web site Property Pages > Start Options > Debuggers > ASP.NET is checked. Use custom server is set to the URL of the site (which works fine without debugging).

    网站属性页>开始选项>调试器> ASP。净检查。使用自定义服务器设置为站点的URL(在没有调试的情况下运行良好)。

  • Debugging is enabled in web.config.

    在web.config中启用了调试。

  • Application is using ASP.NET 3.5 (I want to move to 4.0 eventually but I have some migration to deal with).

    应用程序使用ASP。NET 3.5(我希望最终达到4.0,但我有一些迁移需要处理)。

  • Application pool: Classing .NET AppPool (also tried DefaultAppPool).

    应用程序池:Classing . net AppPool(也尝试了DefaultAppPool)。

Any ideas where I can check next?

有什么想法吗?

Surely it shouldn't be that hard to install IIS, VS, create a web site, and start testing it?

当然,安装IIS、VS、创建web站点并开始测试它应该不是那么难吗?

Thanks in advance.

提前谢谢。

31 个解决方案

#1


237  

Try going to IIS and checking to make sure the App Pool you are using is started. A lot of times, you will produce an error that shuts down the app pool. You just need to right click and Start and you should be good to go.

试着去IIS和检查,确保你正在使用的应用程序池已经启动。很多时候,你会产生一个关闭应用程序池的错误。你只需要右键点击开始,你就该走了。

#2


41  

Turns out that the culprit was the IIS Url Rewrite module. I had defined a rule that redirected calls to Default.aspx (which was set as the start page of the web site) to the root of the site so that I could have a canonical home URL. However, apparently VS had a problem with this and got confused. This problem did not happen when I was using Helicon ISAPI_Rewrite so it didn't even occur to me to check.

事实证明,罪魁祸首是IIS Url重写模块。我已经定义了一个重定向调用默认的规则。aspx(它被设置为web站点的起始页)到站点的根目录,这样我就可以有一个规范的主页URL。然而,显然VS在这个问题上有问题,并且很困惑。这个问题没有发生,当我使用螺旋的ISAPI_Rewrite时,它甚至没有出现在我的检查。

I ended up creating a whole new web site from scratch and porting projects/files over little by little into my solution and rebuilding my web.config until I found this out! Well, at least now I have a slightly cleaner site using .NET 4.0 (so far, hopefully I won't run into any walls)--but what a pain!

最后,我从头开始创建了一个全新的web站点,并将项目/文件移植到我的解决方案和重建web上。直到我发现了这个!好吧,至少现在我有一个使用。net 4.0的稍微干净点的网站(到目前为止,希望我不会碰到任何墙壁)——但是太痛苦了!

#3


38  

Visual Studio, when starting up, will (for some reason) attempt to access the URL:

Visual Studio启动时,将(出于某种原因)尝试访问URL:

/debugattach.aspx

/ debugattach.aspx

If you have a rewrite rule that redirects (or otherwise catches), say, .aspx files, somewhere else then you will get this error. The solution is to add this section to the beginning of your web.config's <system.webServer>/<rewrite>/<rules> section:

如果您有一个重定向(或其他捕获)的重写规则,比如.aspx文件,那么您将会得到这个错误。解决方案是将此部分添加到web的开始部分。配置的 <系统。网络服务器> / <修改> / <规定> 部分:

<rule name="Ignore Default.aspx" enabled="true" stopProcessing="true">
    <match url="^debugattach\.aspx" />
    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
    <action type="None" />
</rule>

This will make sure to catch this one particular request, do nothing, and, most importantly, stop execution so none of your other rules will get run. This is a robust solution, so feel free to keep this in your config file for production.

这将确保捕获这个特殊请求,什么都不做,最重要的是,停止执行,这样其他规则就不会运行了。这是一个健壮的解决方案,所以您可以在配置文件中保留它以进行生产。

#4


29  

For the benefit of others, in my case I had configured the application pool to use my windows credentials in order to access a network resource share. Since debugging the solution last I had reset my windows password. Changed password stored in app pool and bada bing.

为了其他的好处,在我的例子中,我已经配置了应用程序池,以使用我的windows凭据来访问网络资源共享。自从调试解决方案后,我重新设置了我的windows密码。更改了存储在应用程序池和bada bing中的密码。

#5


19  

If ApplicationPool Identity is set custom account and computer's password is changed, you have to update your password

如果应用程序池标识设置自定义帐户,而计算机的密码更改,则必须更新密码。

#6


17  

For my scenario it was changes to the httpErrors section in web.config, setting it like this:

对于我的场景,它是web上的httpErrors部分的更改。配置,设置如下:

<httpErrors mode="Custom"> 

caused the "Unable to start debugging on the web server" issue. Setting it back to the previous value of "DetailedLocalOnly" fixed the issue. Digging a little deeper I discovered that it was actually just the 401 error setting that was causing this:

导致“无法在web服务器上启动调试”问题。将其重新设置为“DetailedLocalOnly”的前一个值解决了这个问题。再深入一点,我发现实际上是401错误设置造成的:

<httpErrors mode="Custom"> 
    <error statusCode="401" prefixLanguageFilePath="" path="/masterpages/500.html" responseMode="ExecuteURL" />
<httpErrors mode="Custom"> 

Commenting out the 401 error line fixed the issue as well, I went with that since I can then maintain the custom error handling and start with debugging.

在注释401错误代码时,我也解决了这个问题,因为我可以维护自定义错误处理,并从调试开始。

I still have no idea why this is happening.

我仍然不知道为什么会这样。

#7


13  

Plase check application pool. if it is stoped. restart it.

Plase检查应用程序池。如果它是停止。重新启动它。

#8


11  

Had the same issue trying to debug a DNN (Dot Net Nuke) module. Turned out you need to have compilation debug="true":

有相同的问题试图调试DNN (Dot Net Nuke)模块。原来你需要编译debug="true":

<compilation debug="true" strict="false" targetFramework="4.0"> 

in your web.config. By default it is false in DNN. Original source here: http://www.dnnsoftware.com/forums/forumid/111/postid/189880/scope/posts

在你的web . config。默认情况下,它在DNN中是错误的。原始来源:http://www.dnnsoftware.com/forums/forumid/111/postid/189880/scope/posts

#9


8  

I have exactly the same problem after implementing the rewrite module.

在实现重写模块后,我有完全相同的问题。

If I remove the rewrite entries from my web.config file, debugging works perfectly.

如果我从我的网站删除重写条目。配置文件,调试工作完美。

To get around this, I just to comment out the rewrite tags while debugging, like this...

为了解决这个问题,我只是在调试时注释掉重写标记,就像这样…

<rewrite>
    <rules>
        <rule name="LowerCaseRule_1" stopProcessing="true">
            <match url="[A-Z]" ignoreCase="false" />
            <action type="Redirect" url="{ToLower:{URL}}" />
        </rule>
        <rule name="RedirectDefault.aspx_1" stopProcessing="true">
            <match url="(.*)default.aspx" />
            <action type="Redirect" url="{R:1}" redirectType="Permanent" />
        </rule>
    </rules>
</rewrite>

I then remove the comments after debugging.

然后在调试之后删除注释。

Must be an bug in visual studio 2010.

必须是visual studio 2010中的一个bug。

#10


6  

I got the same error since Application pool was stopped in IIS. After starting the App Pool, the issue was resolved.

在IIS中停止应用程序池之后,我得到了相同的错误。启动应用程序池之后,问题就解决了。

#11


5  

Here is what I did to clear the error you noted. Locate the web folder for the app within the file system, go to Properties=>Security click the Advanced button then click the Owner tab, click the Edit button and change the owner (with the correct permissions) of the folder and checked the "Repalce owner on subcontainers and objects" checkbox. Click "Apply" and then I was in business (able to debug).

以下是我所做的,以清除您所注意到的错误。在文件系统中找到应用程序的web文件夹,访问属性=>安全点击高级按钮,然后单击“所有者”选项卡,单击“编辑”按钮,并更改文件夹的所有者(带有正确的权限),并检查“在子容器和对象上的Repalce所有者”复选框。点击“应用”,然后我就进入了业务(可以调试)。

Hope this works for someone else.

希望这对其他人有用。

#12


5  

Just finally fixed this for my single solution that was having this. Two of the projects in the solution were set as sites in IIS. I went in and enabled ASP.Net Impersonation under Authentication for both projects...and VIOLA! FINALLY, no more of this annoying error!

最后把这个固定在我的唯一的解决方案中。解决方案中的两个项目被设置为IIS中的站点。我加入了ASP。在两个项目的身份验证下的网络模拟…和中提琴!最后,不要再犯这个烦人的错误了!

#13


3  

I was getting the same error message in VS 2012, but was not running as Administrator. When I ran the app as administrator, I got a different and slightly more helpful message (which I was able to figure out). HTH

在VS 2012中,我收到了相同的错误消息,但没有作为管理员运行。当我以管理员的身份运行这个应用程序时,我得到了一个不同的、稍微更有用的消息(我能够弄清楚)。HTH

#14


3  

If App Pool has trouble restarting or simply doesn't want to restart, verify if windows made recent update on ASP.NET v4.0 or other App Pool. That is what happend in my case. I simply restarted my computer, then restarted ASP.NET v4.0 App Pool and everything was working again!

如果应用程序池重新启动或根本不想重新启动,请验证windows最近是否更新了ASP。NET v4.0或其他应用程序池。这就是我的情况。我只是重启了我的电脑,然后重启ASP。NET v4.0应用程序池,一切都恢复正常了!

#15


2  

Dan,

丹,

In addition to Aaron's suggestions, try the following

除了Aaron的建议,试试下面的方法。

  • Check that integrated windows authentication is selected in your IIS website
  • 在您的IIS网站中选择集成的windows认证。
  • Can you debug using Cassini instead of IIS?
  • 你能用卡西尼代替IIS调试吗?

#16


2  

Had the same problem with Windows 10 when turned on all IIS windows features. Switched to Windows 8.1 and got problem again. The root was in web site name "http://MySite.local" (not related to OS version).

当Windows 10打开所有IIS Windows特性时,也有同样的问题。切换到Windows 8.1,再次出现问题。根在网站名称“http://MySite”。本地“(与OS版本无关)。

And solution is simple

和解决方案很简单

  • Edit hosts file in %SystemRoot%\System32\drivers\etc\

    编辑主机文件在%SystemRoot%\System32\驱动器\等。

  • Add line with ip binding: 127.0.0.1 MySite.local

    添加ip绑定:127.0.0.1 MySite.local。

#17


1  

I had this error come up today due to a defect in code that was posting back a tremendous amount of times causing IIS to be flooded with requests. This essentially locked up IIS and so when I tried to debug, it 'timed out' trying to start the debugger. I simply restarted IIS, which took a few minutes, and it solved the issue.

我今天出现了这个错误,因为代码中出现了一个缺陷,这导致了大量的时间导致IIS被请求淹没。这本质上锁定了IIS,所以当我尝试调试时,它“超时”试图启动调试器。我只是重新启动了IIS,它花了几分钟时间,它解决了这个问题。

I sure do wish this error was less generic, seems like there are several different ways to produce it.

我确实希望这个错误不那么通用,似乎有几种不同的方法来产生它。

#18


1  

I had the same problem in Visual Studio 2012 and 2013 on Windows 8.1. For me the fix was to add Windows Authentication to IIS using 'Turn Windows features on or off'

在Visual Studio 2012和2013年的Windows 8.1中,我也遇到过同样的问题。对我来说,解决方案是在IIS中添加Windows身份验证,使用“打开或关闭Windows功能”

无法在web服务器上启动调试。无法开始ASP。NET调试VS 2010, II7, Win 7 x64。

#19


1  

Be sure your site's Application Pool uses the correct framework version. I got the "Unable to start debugging" error on an ASP.Net 2005 site. It was incorrectly using the DefaultAppPool on Windows 7 (which I believe was using .Net Framework 4). I created a new a App Pool based on .Net Framework 2 and assigned it to the problem web site. After that debugging worked fine.

确保您的站点的应用程序池使用正确的框架版本。我在ASP中得到了“无法启动调试”错误。净2005网站。在Windows 7上使用DefaultAppPool是错误的(我相信这是使用。net Framework 4)。我创建了一个基于。net Framework 2的新应用程序池,并将它分配给了问题网站。在那之后,调试工作正常。

#20


1  

Check if your website on IIS is not stop.

检查你的网站是否在IIS上没有停止。

I fixed it put my web site to run. :D

我修好了它让我的网站运行。:D

#21


1  

I had this problem and eventually realized that I ASP.net is not registered properly with IIS. This can happen when IIS server is installed before Visual Studio. To fix this issue, use the command aspnet_regiis -i Further information can be found in the link

我遇到了这个问题,最终意识到我的ASP.net没有正确地注册到IIS。当IIS服务器安装在Visual Studio之前,就会发生这种情况。要解决这个问题,可以使用命令aspnet_regiis -我可以在链接中找到进一步的信息。

#22


1  

had same issue. If you have SSL certificate installed on IIS and if you are trying to debug it from Visual Studio then you need to set your application on IIS to ignore certificate.

有同样的问题。如果您在IIS上安装了SSL证书,如果您试图从Visual Studio调试它,那么您需要在IIS上设置您的应用程序以忽略证书。

#23


1  

I had the same issue and found that it was caused because i had a character mistakenly typed in my Web.config after the end tag. My Web.config looked like this right at the end: </section>h. The "h" was an extra character after the closing tag.

我有同样的问题,发现它是由于我的一个字符错误地输入了我的网络。配置结束标签后。我的网络。配置在末尾是这样的:h。“h”是结束标签后的一个额外字符。

#24


0  

remove sting like this: targetFramework="4.0" in web.config or change AppPool to appropriate framework version.

在web上删除这样的sting: targetFramework="4.0"。配置或更改AppPool到适当的框架版本。

#25


0  

Uninstalling the IIS UrlScan Extension solved the problem for me.

卸载IIS UrlScan扩展解决了我的问题。

#26


0  

I had faced the same problem but it was on Visual studios's own web development server instead of IIS.The get around is to uncheck the option in Web tab under project properties, Apply server settings to all users(store in project file.).Hope it will save some one's valuable time.

我也遇到过同样的问题,但它是在Visual studio自己的web开发服务器上,而不是IIS。get around是在项目属性下取消勾选Web选项卡中的选项,将服务器设置应用到所有用户(在项目文件中存储)。希望能节省一些宝贵的时间。

#27


0  

I had the same problem. All the answers above did not work for me. The solution was to delete the bin and obj folder manually.

我遇到了同样的问题。以上所有的答案对我都不起作用。解决方案是手动删除bin和obj文件夹。

#28


0  

I found this issue too but it was most similar to what @Kirk explained and URL rewriting.

我也发现了这个问题,但它与@Kirk解释和URL重写最相似。

In my case someone had checked in this change to the web.config file for a MVC project:

在我的情况下,有人在网上查过这个变化。MVC项目的配置文件:

<system.webServer>
    <security>
        <requestFiltering>
            <fileExtensions>
                <add fileExtension=".aspx" allowed="false" />
            </fileExtensions>
        </requestFiltering>
    </security>
</system.webServer>

Because .aspx file extensions were not allowed on the web server, the /debugattach.aspx URL was denied, preventing the debugger from running. Once I removed this configuration it worked again.

因为.aspx文件扩展在web服务器上是不允许的,/debugattach。aspx URL被拒绝,阻止调试器运行。一旦我删除了这个配置,它又重新运行了。

#29


0  

I had the same problem when I created application in Visual Studio, and then in properties created virtual directory for use with local IIS. If someone has this error it is because VS creates application under wrong AppPool, i.e. under AppPool which doesn't suit your needs.
If this is the case, go to IIS Manager, select App, Go to Basic settings and change AppPool for App and you are good to go.

当我在Visual Studio中创建应用程序时,我遇到了同样的问题,然后在属性创建的虚拟目录中使用本地IIS。如果有人有这个错误,那是因为VS在错误的AppPool下创建应用程序,即在AppPool下,这并不适合您的需要。如果是这样的话,那就去IIS管理器,选择App,去基本设置,然后改变AppPool,你就可以去了。

#30


0  

I got this same error recently and in my case it turned out that there were duplicate MIME types. I had recently added two that didn't show up in the list initially. IIS let me add them and it was only when I decided to check the MIME types for the site again as part of my diagnostic process that I got an error in IIS as well. It referenced duplicates in web.config. Once I went back into the web.config file I noticed that a new section called had been added, which included the two recently-added MIME types. Deleted that section and life is good again! Hoping this may help others who haven't managed to fix the issue with any of the other suggestions.

我最近犯了同样的错误,在我的例子中发现有重复的MIME类型。我最近添加了两个在最初的列表中没有出现的。IIS允许我添加它们,只有当我决定再次检查站点的MIME类型时,作为诊断过程的一部分,我在IIS中也有错误。它在web.config中引用了副本。有一次我回到了网上。配置文件我注意到添加了一个新的section,其中包括最近添加的两个MIME类型。删除了那部分,生活又好了!希望这能帮助那些没有解决这个问题的人提出其他的建议。

#1


237  

Try going to IIS and checking to make sure the App Pool you are using is started. A lot of times, you will produce an error that shuts down the app pool. You just need to right click and Start and you should be good to go.

试着去IIS和检查,确保你正在使用的应用程序池已经启动。很多时候,你会产生一个关闭应用程序池的错误。你只需要右键点击开始,你就该走了。

#2


41  

Turns out that the culprit was the IIS Url Rewrite module. I had defined a rule that redirected calls to Default.aspx (which was set as the start page of the web site) to the root of the site so that I could have a canonical home URL. However, apparently VS had a problem with this and got confused. This problem did not happen when I was using Helicon ISAPI_Rewrite so it didn't even occur to me to check.

事实证明,罪魁祸首是IIS Url重写模块。我已经定义了一个重定向调用默认的规则。aspx(它被设置为web站点的起始页)到站点的根目录,这样我就可以有一个规范的主页URL。然而,显然VS在这个问题上有问题,并且很困惑。这个问题没有发生,当我使用螺旋的ISAPI_Rewrite时,它甚至没有出现在我的检查。

I ended up creating a whole new web site from scratch and porting projects/files over little by little into my solution and rebuilding my web.config until I found this out! Well, at least now I have a slightly cleaner site using .NET 4.0 (so far, hopefully I won't run into any walls)--but what a pain!

最后,我从头开始创建了一个全新的web站点,并将项目/文件移植到我的解决方案和重建web上。直到我发现了这个!好吧,至少现在我有一个使用。net 4.0的稍微干净点的网站(到目前为止,希望我不会碰到任何墙壁)——但是太痛苦了!

#3


38  

Visual Studio, when starting up, will (for some reason) attempt to access the URL:

Visual Studio启动时,将(出于某种原因)尝试访问URL:

/debugattach.aspx

/ debugattach.aspx

If you have a rewrite rule that redirects (or otherwise catches), say, .aspx files, somewhere else then you will get this error. The solution is to add this section to the beginning of your web.config's <system.webServer>/<rewrite>/<rules> section:

如果您有一个重定向(或其他捕获)的重写规则,比如.aspx文件,那么您将会得到这个错误。解决方案是将此部分添加到web的开始部分。配置的 <系统。网络服务器> / <修改> / <规定> 部分:

<rule name="Ignore Default.aspx" enabled="true" stopProcessing="true">
    <match url="^debugattach\.aspx" />
    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
    <action type="None" />
</rule>

This will make sure to catch this one particular request, do nothing, and, most importantly, stop execution so none of your other rules will get run. This is a robust solution, so feel free to keep this in your config file for production.

这将确保捕获这个特殊请求,什么都不做,最重要的是,停止执行,这样其他规则就不会运行了。这是一个健壮的解决方案,所以您可以在配置文件中保留它以进行生产。

#4


29  

For the benefit of others, in my case I had configured the application pool to use my windows credentials in order to access a network resource share. Since debugging the solution last I had reset my windows password. Changed password stored in app pool and bada bing.

为了其他的好处,在我的例子中,我已经配置了应用程序池,以使用我的windows凭据来访问网络资源共享。自从调试解决方案后,我重新设置了我的windows密码。更改了存储在应用程序池和bada bing中的密码。

#5


19  

If ApplicationPool Identity is set custom account and computer's password is changed, you have to update your password

如果应用程序池标识设置自定义帐户,而计算机的密码更改,则必须更新密码。

#6


17  

For my scenario it was changes to the httpErrors section in web.config, setting it like this:

对于我的场景,它是web上的httpErrors部分的更改。配置,设置如下:

<httpErrors mode="Custom"> 

caused the "Unable to start debugging on the web server" issue. Setting it back to the previous value of "DetailedLocalOnly" fixed the issue. Digging a little deeper I discovered that it was actually just the 401 error setting that was causing this:

导致“无法在web服务器上启动调试”问题。将其重新设置为“DetailedLocalOnly”的前一个值解决了这个问题。再深入一点,我发现实际上是401错误设置造成的:

<httpErrors mode="Custom"> 
    <error statusCode="401" prefixLanguageFilePath="" path="/masterpages/500.html" responseMode="ExecuteURL" />
<httpErrors mode="Custom"> 

Commenting out the 401 error line fixed the issue as well, I went with that since I can then maintain the custom error handling and start with debugging.

在注释401错误代码时,我也解决了这个问题,因为我可以维护自定义错误处理,并从调试开始。

I still have no idea why this is happening.

我仍然不知道为什么会这样。

#7


13  

Plase check application pool. if it is stoped. restart it.

Plase检查应用程序池。如果它是停止。重新启动它。

#8


11  

Had the same issue trying to debug a DNN (Dot Net Nuke) module. Turned out you need to have compilation debug="true":

有相同的问题试图调试DNN (Dot Net Nuke)模块。原来你需要编译debug="true":

<compilation debug="true" strict="false" targetFramework="4.0"> 

in your web.config. By default it is false in DNN. Original source here: http://www.dnnsoftware.com/forums/forumid/111/postid/189880/scope/posts

在你的web . config。默认情况下,它在DNN中是错误的。原始来源:http://www.dnnsoftware.com/forums/forumid/111/postid/189880/scope/posts

#9


8  

I have exactly the same problem after implementing the rewrite module.

在实现重写模块后,我有完全相同的问题。

If I remove the rewrite entries from my web.config file, debugging works perfectly.

如果我从我的网站删除重写条目。配置文件,调试工作完美。

To get around this, I just to comment out the rewrite tags while debugging, like this...

为了解决这个问题,我只是在调试时注释掉重写标记,就像这样…

<rewrite>
    <rules>
        <rule name="LowerCaseRule_1" stopProcessing="true">
            <match url="[A-Z]" ignoreCase="false" />
            <action type="Redirect" url="{ToLower:{URL}}" />
        </rule>
        <rule name="RedirectDefault.aspx_1" stopProcessing="true">
            <match url="(.*)default.aspx" />
            <action type="Redirect" url="{R:1}" redirectType="Permanent" />
        </rule>
    </rules>
</rewrite>

I then remove the comments after debugging.

然后在调试之后删除注释。

Must be an bug in visual studio 2010.

必须是visual studio 2010中的一个bug。

#10


6  

I got the same error since Application pool was stopped in IIS. After starting the App Pool, the issue was resolved.

在IIS中停止应用程序池之后,我得到了相同的错误。启动应用程序池之后,问题就解决了。

#11


5  

Here is what I did to clear the error you noted. Locate the web folder for the app within the file system, go to Properties=>Security click the Advanced button then click the Owner tab, click the Edit button and change the owner (with the correct permissions) of the folder and checked the "Repalce owner on subcontainers and objects" checkbox. Click "Apply" and then I was in business (able to debug).

以下是我所做的,以清除您所注意到的错误。在文件系统中找到应用程序的web文件夹,访问属性=>安全点击高级按钮,然后单击“所有者”选项卡,单击“编辑”按钮,并更改文件夹的所有者(带有正确的权限),并检查“在子容器和对象上的Repalce所有者”复选框。点击“应用”,然后我就进入了业务(可以调试)。

Hope this works for someone else.

希望这对其他人有用。

#12


5  

Just finally fixed this for my single solution that was having this. Two of the projects in the solution were set as sites in IIS. I went in and enabled ASP.Net Impersonation under Authentication for both projects...and VIOLA! FINALLY, no more of this annoying error!

最后把这个固定在我的唯一的解决方案中。解决方案中的两个项目被设置为IIS中的站点。我加入了ASP。在两个项目的身份验证下的网络模拟…和中提琴!最后,不要再犯这个烦人的错误了!

#13


3  

I was getting the same error message in VS 2012, but was not running as Administrator. When I ran the app as administrator, I got a different and slightly more helpful message (which I was able to figure out). HTH

在VS 2012中,我收到了相同的错误消息,但没有作为管理员运行。当我以管理员的身份运行这个应用程序时,我得到了一个不同的、稍微更有用的消息(我能够弄清楚)。HTH

#14


3  

If App Pool has trouble restarting or simply doesn't want to restart, verify if windows made recent update on ASP.NET v4.0 or other App Pool. That is what happend in my case. I simply restarted my computer, then restarted ASP.NET v4.0 App Pool and everything was working again!

如果应用程序池重新启动或根本不想重新启动,请验证windows最近是否更新了ASP。NET v4.0或其他应用程序池。这就是我的情况。我只是重启了我的电脑,然后重启ASP。NET v4.0应用程序池,一切都恢复正常了!

#15


2  

Dan,

丹,

In addition to Aaron's suggestions, try the following

除了Aaron的建议,试试下面的方法。

  • Check that integrated windows authentication is selected in your IIS website
  • 在您的IIS网站中选择集成的windows认证。
  • Can you debug using Cassini instead of IIS?
  • 你能用卡西尼代替IIS调试吗?

#16


2  

Had the same problem with Windows 10 when turned on all IIS windows features. Switched to Windows 8.1 and got problem again. The root was in web site name "http://MySite.local" (not related to OS version).

当Windows 10打开所有IIS Windows特性时,也有同样的问题。切换到Windows 8.1,再次出现问题。根在网站名称“http://MySite”。本地“(与OS版本无关)。

And solution is simple

和解决方案很简单

  • Edit hosts file in %SystemRoot%\System32\drivers\etc\

    编辑主机文件在%SystemRoot%\System32\驱动器\等。

  • Add line with ip binding: 127.0.0.1 MySite.local

    添加ip绑定:127.0.0.1 MySite.local。

#17


1  

I had this error come up today due to a defect in code that was posting back a tremendous amount of times causing IIS to be flooded with requests. This essentially locked up IIS and so when I tried to debug, it 'timed out' trying to start the debugger. I simply restarted IIS, which took a few minutes, and it solved the issue.

我今天出现了这个错误,因为代码中出现了一个缺陷,这导致了大量的时间导致IIS被请求淹没。这本质上锁定了IIS,所以当我尝试调试时,它“超时”试图启动调试器。我只是重新启动了IIS,它花了几分钟时间,它解决了这个问题。

I sure do wish this error was less generic, seems like there are several different ways to produce it.

我确实希望这个错误不那么通用,似乎有几种不同的方法来产生它。

#18


1  

I had the same problem in Visual Studio 2012 and 2013 on Windows 8.1. For me the fix was to add Windows Authentication to IIS using 'Turn Windows features on or off'

在Visual Studio 2012和2013年的Windows 8.1中,我也遇到过同样的问题。对我来说,解决方案是在IIS中添加Windows身份验证,使用“打开或关闭Windows功能”

无法在web服务器上启动调试。无法开始ASP。NET调试VS 2010, II7, Win 7 x64。

#19


1  

Be sure your site's Application Pool uses the correct framework version. I got the "Unable to start debugging" error on an ASP.Net 2005 site. It was incorrectly using the DefaultAppPool on Windows 7 (which I believe was using .Net Framework 4). I created a new a App Pool based on .Net Framework 2 and assigned it to the problem web site. After that debugging worked fine.

确保您的站点的应用程序池使用正确的框架版本。我在ASP中得到了“无法启动调试”错误。净2005网站。在Windows 7上使用DefaultAppPool是错误的(我相信这是使用。net Framework 4)。我创建了一个基于。net Framework 2的新应用程序池,并将它分配给了问题网站。在那之后,调试工作正常。

#20


1  

Check if your website on IIS is not stop.

检查你的网站是否在IIS上没有停止。

I fixed it put my web site to run. :D

我修好了它让我的网站运行。:D

#21


1  

I had this problem and eventually realized that I ASP.net is not registered properly with IIS. This can happen when IIS server is installed before Visual Studio. To fix this issue, use the command aspnet_regiis -i Further information can be found in the link

我遇到了这个问题,最终意识到我的ASP.net没有正确地注册到IIS。当IIS服务器安装在Visual Studio之前,就会发生这种情况。要解决这个问题,可以使用命令aspnet_regiis -我可以在链接中找到进一步的信息。

#22


1  

had same issue. If you have SSL certificate installed on IIS and if you are trying to debug it from Visual Studio then you need to set your application on IIS to ignore certificate.

有同样的问题。如果您在IIS上安装了SSL证书,如果您试图从Visual Studio调试它,那么您需要在IIS上设置您的应用程序以忽略证书。

#23


1  

I had the same issue and found that it was caused because i had a character mistakenly typed in my Web.config after the end tag. My Web.config looked like this right at the end: </section>h. The "h" was an extra character after the closing tag.

我有同样的问题,发现它是由于我的一个字符错误地输入了我的网络。配置结束标签后。我的网络。配置在末尾是这样的:h。“h”是结束标签后的一个额外字符。

#24


0  

remove sting like this: targetFramework="4.0" in web.config or change AppPool to appropriate framework version.

在web上删除这样的sting: targetFramework="4.0"。配置或更改AppPool到适当的框架版本。

#25


0  

Uninstalling the IIS UrlScan Extension solved the problem for me.

卸载IIS UrlScan扩展解决了我的问题。

#26


0  

I had faced the same problem but it was on Visual studios's own web development server instead of IIS.The get around is to uncheck the option in Web tab under project properties, Apply server settings to all users(store in project file.).Hope it will save some one's valuable time.

我也遇到过同样的问题,但它是在Visual studio自己的web开发服务器上,而不是IIS。get around是在项目属性下取消勾选Web选项卡中的选项,将服务器设置应用到所有用户(在项目文件中存储)。希望能节省一些宝贵的时间。

#27


0  

I had the same problem. All the answers above did not work for me. The solution was to delete the bin and obj folder manually.

我遇到了同样的问题。以上所有的答案对我都不起作用。解决方案是手动删除bin和obj文件夹。

#28


0  

I found this issue too but it was most similar to what @Kirk explained and URL rewriting.

我也发现了这个问题,但它与@Kirk解释和URL重写最相似。

In my case someone had checked in this change to the web.config file for a MVC project:

在我的情况下,有人在网上查过这个变化。MVC项目的配置文件:

<system.webServer>
    <security>
        <requestFiltering>
            <fileExtensions>
                <add fileExtension=".aspx" allowed="false" />
            </fileExtensions>
        </requestFiltering>
    </security>
</system.webServer>

Because .aspx file extensions were not allowed on the web server, the /debugattach.aspx URL was denied, preventing the debugger from running. Once I removed this configuration it worked again.

因为.aspx文件扩展在web服务器上是不允许的,/debugattach。aspx URL被拒绝,阻止调试器运行。一旦我删除了这个配置,它又重新运行了。

#29


0  

I had the same problem when I created application in Visual Studio, and then in properties created virtual directory for use with local IIS. If someone has this error it is because VS creates application under wrong AppPool, i.e. under AppPool which doesn't suit your needs.
If this is the case, go to IIS Manager, select App, Go to Basic settings and change AppPool for App and you are good to go.

当我在Visual Studio中创建应用程序时,我遇到了同样的问题,然后在属性创建的虚拟目录中使用本地IIS。如果有人有这个错误,那是因为VS在错误的AppPool下创建应用程序,即在AppPool下,这并不适合您的需要。如果是这样的话,那就去IIS管理器,选择App,去基本设置,然后改变AppPool,你就可以去了。

#30


0  

I got this same error recently and in my case it turned out that there were duplicate MIME types. I had recently added two that didn't show up in the list initially. IIS let me add them and it was only when I decided to check the MIME types for the site again as part of my diagnostic process that I got an error in IIS as well. It referenced duplicates in web.config. Once I went back into the web.config file I noticed that a new section called had been added, which included the two recently-added MIME types. Deleted that section and life is good again! Hoping this may help others who haven't managed to fix the issue with any of the other suggestions.

我最近犯了同样的错误,在我的例子中发现有重复的MIME类型。我最近添加了两个在最初的列表中没有出现的。IIS允许我添加它们,只有当我决定再次检查站点的MIME类型时,作为诊断过程的一部分,我在IIS中也有错误。它在web.config中引用了副本。有一次我回到了网上。配置文件我注意到添加了一个新的section,其中包括最近添加的两个MIME类型。删除了那部分,生活又好了!希望这能帮助那些没有解决这个问题的人提出其他的建议。