IIS出错,无法在webserver上启动调试

时间:2021-04-20 01:45:58

I want to run my application from IIS on my local machine. I created the virtual directory and added the application to it and in the properties folder of the application I checked the radio button 'Use Local IIS Webserver'. I then started running my application but I'm getting the following error:

我想在本地机器上运行我的应用程序。我创建了虚拟目录并将应用程序添加到其中,并在应用程序的属性文件夹中选中了单选按钮“使用本地IIS Webserver”。然后我开始运行我的应用程序,但我得到了以下错误:

Unable to start debugging on the webserver.see help for common configuration errors.Running the webpage outside of the debugger may provide further information.

无法在webserver上启动调试。请参阅常见配置错误的帮助。在调试器之外运行网页可以提供进一步的信息。

Make sure the server in operating correctly.Verify there are no syntax errors in web.config by doing a debug.Start Without Debugging.You may also want to refer to the ASP.NET and ATL Server debugging topic in the online documentation.

确保服务器正常运行。验证web中没有语法错误。通过调试进行配置。开始没有调试。您也可以参考ASP。NET和ATL服务器调试主题在在线文档中。

How do I get rid of this error?

我怎么才能摆脱这个错误呢?

I'm using Visual Studio 2010 on Windows 7 and IIS 7.5.

我在Windows 7和IIS 7.5上使用Visual Studio 2010。

29 个解决方案

#1


22  

There may be many reasons for the above problem.

上述问题可能有很多原因。

You need to check this:- Unable to Start Debugging on the Web Server

您需要检查这个:-无法在Web服务器上开始调试

On a side note:- Go to IIS and check that the App Pool you are using is started.

注意:-到IIS检查正在使用的应用程序池是否已经启动。

Try this from your command line:-

试试你的命令行:-

cd %windir%\Microsoft.NET\Framework\v4.0.30319
aspnet_regiis.exe -i

#2


16  

There are multiple solution of this problem, in my case I changed my machine's password but forget to change it in the process model identity of Advance setting of that Application pool.

这个问题有多个解决方案,在我的例子中,我更改了我的机器的密码,但是忘记在该应用程序池的预先设置的过程模型标识中更改它。

Later IISRESET did the trick for me.

后来,IISRESET为我做了这道题。

#3


14  

Just an update as I hit this issue and all of the settings in both Visual Studio and IIS seemed to be correct.

当我点击这个问题的时候更新一下,在Visual Studio和IIS中所有的设置看起来都是正确的。

What actually worked for me was simply running Visual Studio as an administrator - I'm guessing that there is a permission that needs to be set somewhere, but I have no idea what or where.

对我来说,真正起作用的是作为管理员运行Visual Studio——我猜应该在某个地方设置一个权限,但我不知道是什么,在哪里。

Also a point to note is that I configured all my websites to use the DefaultAppPool in IIS which at the time was ASP.NET V2, then installed .NET 4 and the DefaultAppPool was converted to .NET4 so none of the sites would compile (that caused me a small amount of swearing)

还有一点需要注意的是,我将所有网站都配置为在IIS中使用DefaultAppPool,当时它是ASP。NET V2,然后安装。NET4, DefaultAppPool被转换为。net4,所以没有一个网站会被编译(这让我发誓)

Hope that helps someone

希望能帮助一些人

#4


7  

I've seen alot of different solutions for this. iisreset did the trick for me.

我见过很多不同的解。iisreset为我弄好了。

Just open an elevated command prompt and type:

打开一个命令提示符,输入:

iisreset

iis重启

#5


6  

Just to add, I had this issue, and fixed by disabling the Load User Profile option (unsure of any side effects). This is found through Advanced Settings for the Application Pool.

补充一下,我有这个问题,通过禁用Load User Profile选项(不确定有任何副作用)来修复。这可以通过应用程序池的高级设置找到。

IIS出错,无法在webserver上启动调试

This then made it work for me.

这使它为我工作。

#6


3  

Just had the same issue after VS crashed and Rahul's comment regarding the application pool pointed me in the right direction. In my case recycling the app pool did the trick (IIS Manager => App Pools => right click on ap in question and recycle).

在VS崩溃后也出现了同样的问题,Rahul关于应用程序池的评论给我指明了正确的方向。在我的例子中,回收应用程序池是有用的(IIS管理器=>应用程序池=>右键单击有问题的ap并回收)。

#7


3  

The best answer online is at here. I tried the fifth method.

网上最好的答案在这里。我尝试了第五种方法。

  1. Right click on your project in VS2005 or VS2008 or VS2010
  2. 在VS2005或VS2008或VS2010中右键单击您的项目
  3. Click on Properties
  4. 点击属性
  5. Click on Web tab
  6. 单击Web选项卡
  7. Under Servers, click on the radio button Use Visual Studio Development Server
  8. 在Servers下,单击单选按钮使用Visual Studio开发服务器
  9. Check Auto Assign Port radio button
  10. 检查自动分配端口按钮
  11. Uncheck NTLM Authentication and Enable Edit and Continue
  12. 取消检查NTLM身份验证并启用编辑和继续

Now run your application it will work for you.

现在运行您的应用程序,它将为您工作。

#8


3  

In my case it was the lack of debug="true" in web.config (system.web -> compilation).

在我的例子中,web中缺少debug="true"。配置(系统。web - >编译)。

example:

例子:

<system.web>
   <compilation debug="true" targetFramework="4.5.2" />
   ....
</system.web>

#9


3  

I didn't see this answer on this thread or the (possible duplicated) question here.

我没有在这个线程上看到这个答案或者这里的(可能重复的)问题。

I fixed the issue by:

我解决了这个问题:

  • Opening the Task Manager (ctrl+alt+del)
  • 打开任务管理器(ctrl+alt+del)
  • Under the Processes tab, End the task of IIS Worker Process (This may now be listed as Microsoft.IIS.Worker.Process or something similar) (You may have to click More details at the bottom if you don't see all of the processes)
  • 在Processes选项卡下,结束IIS Worker进程的任务(现在可以将其列为Microsoft.IIS.Worker。进程或类似的东西)(如果看不到所有进程,您可能需要单击底部的更多细节)
  • Then going to the Services tab, Stop the IISADMIN service and the start it up again.
  • 然后转到Services选项卡,停止IISADMIN服务并重新启动它。

Run the program and that should hopefully fix it! Happy Coding and Debugging! :)

运行这个程序,希望能修复它!编码和调试快乐!:)

#10


2  

If you are using HTTPS on localhost, odds are you created a self signed certificate. These have a tendency to expiry on the same day they are created, so you could have to recreate a certificate and add it to the binding of your locally hosted site.

如果您在localhost上使用HTTPS,很可能您创建了一个自签名证书。它们往往在创建的同一天过期,因此您必须重新创建一个证书并将其添加到本地托管站点的绑定中。

#11


2  

in my case, the DefaultAppPool was stopped, I edited the Advanced Settings and set the value of Identity as LocalSystem, after that I start the DefaultAppPool.

在我的示例中,DefaultAppPool已经停止,我编辑了高级设置,并将标识的值设置为LocalSystem,然后启动DefaultAppPool。

#12


2  

I'm running Windows 10 Professional with Visual Studio 2017 and none of the options above worked for me.

我正在用Visual Studio 2017运行Windows 10专业版,上面的所有选项对我都不起作用。

What fixed it for me was adding 'Windows Process Activation Service'.

为我修复的是添加“Windows流程激活服务”。

Start > Type turn windows Features On or Off > Make sure "Windows Process Activation Service" is checked.

启动>类型,打开或关闭>窗口功能,确保“windows进程激活服务”被选中。

Hope it helps someone.

希望它能帮助一些人。

IIS出错,无法在webserver上启动调试

#13


1  

Do you use or have IIS Rewrite installed on your machine? I have a similar problem on my machine but to get round it, I have web.config open as the current page in VS and press f5. I then have to navigate to the page to debug. It seems to work for me.

您是否在您的机器上安装或使用IIS重写?我的机器上也有类似的问题,但为了解决这个问题,我有网络。在VS中设置为打开当前页面并按f5。然后,我必须导航到页面以进行调试。对我来说似乎行得通。

#14


1  

reset your iis in 'Developer Command Prompt for (your visual studio version)'

在“开发人员命令提示符(visual studio版本)”中重置iis

type iisreset in that command prompt & hit enter. it'll reset iis automatically

在命令提示符中键入iisreset,然后按回车键。它会自动重启iis

#15


1  

Just ran into this problem myself and it turned out to be that my site in IIS was set up to use anonymous authentication with a specific network account. I had been forced to reset the password on that account, and so IIS was failing because it was using the old one. Once I updated the site with the new password (or even better, changed it to use Network Service instead), all worked again.

我自己就遇到了这个问题,结果是我在IIS中的站点被设置为使用一个特定的网络帐户来使用匿名身份验证。我*重新设置该帐户的密码,因此IIS失败了,因为它正在使用旧的密码。一旦我用新的密码更新了站点(或者更好的是,将其改为使用网络服务),所有这些都再次工作。

#16


1  

I edited the solution file and changed localhost to my ip address. Before that I had added IIS_IUSRS with full control in the project directory. I can now debug.

我编辑了解决方案文件,并将localhost更改为我的ip地址。在此之前,我已经在项目目录中添加了IIS_IUSRS。我现在可以调试。

#17


1  

go to Search > type services.msc and make sure that ASP.Net State Service is running.

去搜索>类型的服务。确保ASP。Net状态服务正在运行。

#18


1  

In my case this folder was missing:

在我的情况下,这个文件夹不见了:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files

C:\Windows\ Microsoft.NET \ Framework \ v4.0.30319 \临时ASP。网络文件

Adding that folder and the necessary permissions solved it for me.

添加那个文件夹和必要的权限为我解决了这个问题。

#19


1  

Make sure that you etc file in C:\Windows\System32\drivers does not has any other applications with the same name as the one you are getting an error on.

确保你在C:\Windows\System32\drivers不会有任何其他应用程序等文件名称相同的你的一个错误。

I had a Hadoop sandbox configured with the name 'localhost' which was the same as my Visual Studio project which was getting the 'Cannot start debugging on web server' error.

我配置了一个名为“localhost”的Hadoop sandbox,它与我的Visual Studio项目相同,该项目获得了“web服务器无法启动调试”的错误。

Remove those lines and your project should start debugging.

删除这些行,您的项目将开始调试。

#20


0  

I've faced this problem, then I found out that i gotta run Visual Studio as admin in order to debug the project.

我遇到了这个问题,然后我发现我必须以admin的身份运行Visual Studio,以便调试项目。

Hope it helps!

希望它可以帮助!

#21


0  

I had the same issue. The problem was I haven't Framework 4 installed while I had already Framework 4.5 So MIME type ASPX could not be realized without ISAPI 4.0.

我也有同样的问题。问题是我还没有安装框架4,而我已经安装了框架4.5,所以如果没有ISAPI 4.0, MIME类型ASPX就无法实现。

To sort it, I could either uninstalled 4.5 first and add 4.0 then which made trouble or adding specific files to ISAPI restriction and ISAPI filter in the IIS root manually. I needed to grab aspnet_filter.dll and aspnet_isapi.dll located in both C:\Windows\Microsoft.NET\Framework\ and C:\Windows\Microsoft.NET\Framework64\

要对它进行排序,我可以先卸载4.5,然后添加4.0,这会带来麻烦,或者手工在IIS根中添加ISAPI限制和ISAPI过滤器的特定文件。我需要抓取aspnet_filter。dll,aspnet_isapi。dll位于C:\Windows\Microsoft.净\ \和C:\Windows\ Microsoft.NET \ Framework64 \框架

Having added those files, all would be good.

添加了这些文件,一切都会很好。

#22


0  

I resolved this issue. In my case my application pool was stopped. After little bit of Googling i found out that application pool was running under some user identity and password was changed for that user. After updating password it starts working fine.

我解决了这个问题。在我的例子中,我的应用程序池被停止。在我搜索了一小段之后,我发现应用程序池在一些用户标识和密码下运行。更新密码后,开始正常工作。

#23


0  

None of the other solutions worked for me. I resolved this issue by using the commands below.

其他的解决方案对我都不起作用。我使用下面的命令解决了这个问题。

For 32 bit machine:

32位机:

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis –i

For 64 bit machine:

64位机:

C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis –i

The issue is because the web.config file is not installed correctly.

问题在于网络。配置文件没有正确安装。

#24


0  

Thanks for all the answers but none of them worked for me. Although some of them gave me some ideas on what services and stuff that needs to be running to be able "turn on" the debugging of my web app again:

谢谢你所有的答案,但没有一个对我有用。虽然他们中的一些人给了我一些关于哪些服务和东西需要运行才能“打开”我的web应用程序的调试:

  1. Ensure that ASP.Net registered properly with IIS and running. To register it follow @Rahul Tripathi instructions then go to Search > type services.msc and make sure that ASP.Net State Service is running.
  2. 确保ASP。在IIS中正确注册并运行。按照@Rahul Tripathi指令注册它,然后进入搜索>类型的服务。确保ASP。Net状态服务正在运行。
  3. As @Morvael suggested, always run your VS in admin mode.
  4. 正如@Morvael所建议的,始终在管理模式下运行VS。
  5. Check if the app pool where your web app resides is started.
  6. 检查web应用所在的应用程序池是否已经启动。
  7. Ensure that the IIS server itself is running (this what solved the problem for me)
  8. 确保IIS服务器本身正在运行(这为我解决了问题)

I still haven't figured out what is the reason why my IIS stopped. It was working fine yesterday then today it's not. Anyways, I hope this mini checklist helps somebody else. Cheers!

我还没搞清楚我的IIS为什么停止的原因。昨天工作得很好,但今天不行。不管怎样,我希望这个小小的清单能帮助别人。干杯!

#25


0  

Use Microsoft Web Platform Installer to install IIS ASP.NET 4.5

使用Microsoft Web平台安装程序安装IIS ASP。NET 4.5

IIS出错,无法在webserver上启动调试

Found the solution here:

找到了解决方案:

#26


0  

Follow my steps :

按照我的步骤:

  1. Open your web config file .
  2. 打开web配置文件。
  3. See your 'staticContent' tag
  4. 看到你的“staticContent”标签
  5. Delete or commend unwanted setting tag ex: -> < mimeMap fileExtension=".woff" mimeType="application/x-font-woff"/>
  6. 删除或推荐不需要的设置标签ex: -> < mimeMap fileExtension="。woff " mimeType = "的应用程序/ x-font-woff " / >

#27


0  

If you are using active directory login u need to check password and username.

如果您正在使用活动目录登录,您需要检查密码和用户名。

#28


0  

Just one of the 10 sites configured on my Local IIS was giving this error, so I had a feeling that it wasn't anything from the other answers that were machine-wide things, like Turning Windows Features On or Off, or running VS2015 as admin (the other 9 sites worked ok, in the same VS).

只是我的10个网站上配置一个当地IIS给这个错误,所以我有一种感觉,它不是任何东西,从改变机器的其他答案的东西,喜欢把窗户打开或关闭特性,或运行VS2015 admin(其他9网站工作好,在相同的VS)。

The specific error for me was:

我的具体错误是:

Unable to start debugging on the webserver. Operation not supported. Unknown error:0x80004005

无法在webserver上启动调试。操作不支持。未知错误:0 x80004005

The problem turned out to be the web config having a URL Rewrite rule to rewrite HTTP -> HTTPS. Commenting this out resolved the problem

问题是web配置有一个URL重写规则来重写HTTP -> HTTPS。注释掉这个问题就解决了

TL;DR - try disabling all your web.config URL rewrite rules, if you have them (then add them back in gradually, if it helps)

TL;DR -尝试禁用所有web。配置URL重写规则,如果您有它们(然后逐渐添加它们,如果有帮助的话)

#29


0  

In my case it looks like Chrome locking some resources, preventing from debugger to attach. After I closing Chrome, I able to attach again.

在我的例子中,它看起来像Chrome锁定了一些资源,防止调试器附加。在我关闭Chrome之后,我可以再次连接。

#1


22  

There may be many reasons for the above problem.

上述问题可能有很多原因。

You need to check this:- Unable to Start Debugging on the Web Server

您需要检查这个:-无法在Web服务器上开始调试

On a side note:- Go to IIS and check that the App Pool you are using is started.

注意:-到IIS检查正在使用的应用程序池是否已经启动。

Try this from your command line:-

试试你的命令行:-

cd %windir%\Microsoft.NET\Framework\v4.0.30319
aspnet_regiis.exe -i

#2


16  

There are multiple solution of this problem, in my case I changed my machine's password but forget to change it in the process model identity of Advance setting of that Application pool.

这个问题有多个解决方案,在我的例子中,我更改了我的机器的密码,但是忘记在该应用程序池的预先设置的过程模型标识中更改它。

Later IISRESET did the trick for me.

后来,IISRESET为我做了这道题。

#3


14  

Just an update as I hit this issue and all of the settings in both Visual Studio and IIS seemed to be correct.

当我点击这个问题的时候更新一下,在Visual Studio和IIS中所有的设置看起来都是正确的。

What actually worked for me was simply running Visual Studio as an administrator - I'm guessing that there is a permission that needs to be set somewhere, but I have no idea what or where.

对我来说,真正起作用的是作为管理员运行Visual Studio——我猜应该在某个地方设置一个权限,但我不知道是什么,在哪里。

Also a point to note is that I configured all my websites to use the DefaultAppPool in IIS which at the time was ASP.NET V2, then installed .NET 4 and the DefaultAppPool was converted to .NET4 so none of the sites would compile (that caused me a small amount of swearing)

还有一点需要注意的是,我将所有网站都配置为在IIS中使用DefaultAppPool,当时它是ASP。NET V2,然后安装。NET4, DefaultAppPool被转换为。net4,所以没有一个网站会被编译(这让我发誓)

Hope that helps someone

希望能帮助一些人

#4


7  

I've seen alot of different solutions for this. iisreset did the trick for me.

我见过很多不同的解。iisreset为我弄好了。

Just open an elevated command prompt and type:

打开一个命令提示符,输入:

iisreset

iis重启

#5


6  

Just to add, I had this issue, and fixed by disabling the Load User Profile option (unsure of any side effects). This is found through Advanced Settings for the Application Pool.

补充一下,我有这个问题,通过禁用Load User Profile选项(不确定有任何副作用)来修复。这可以通过应用程序池的高级设置找到。

IIS出错,无法在webserver上启动调试

This then made it work for me.

这使它为我工作。

#6


3  

Just had the same issue after VS crashed and Rahul's comment regarding the application pool pointed me in the right direction. In my case recycling the app pool did the trick (IIS Manager => App Pools => right click on ap in question and recycle).

在VS崩溃后也出现了同样的问题,Rahul关于应用程序池的评论给我指明了正确的方向。在我的例子中,回收应用程序池是有用的(IIS管理器=>应用程序池=>右键单击有问题的ap并回收)。

#7


3  

The best answer online is at here. I tried the fifth method.

网上最好的答案在这里。我尝试了第五种方法。

  1. Right click on your project in VS2005 or VS2008 or VS2010
  2. 在VS2005或VS2008或VS2010中右键单击您的项目
  3. Click on Properties
  4. 点击属性
  5. Click on Web tab
  6. 单击Web选项卡
  7. Under Servers, click on the radio button Use Visual Studio Development Server
  8. 在Servers下,单击单选按钮使用Visual Studio开发服务器
  9. Check Auto Assign Port radio button
  10. 检查自动分配端口按钮
  11. Uncheck NTLM Authentication and Enable Edit and Continue
  12. 取消检查NTLM身份验证并启用编辑和继续

Now run your application it will work for you.

现在运行您的应用程序,它将为您工作。

#8


3  

In my case it was the lack of debug="true" in web.config (system.web -> compilation).

在我的例子中,web中缺少debug="true"。配置(系统。web - >编译)。

example:

例子:

<system.web>
   <compilation debug="true" targetFramework="4.5.2" />
   ....
</system.web>

#9


3  

I didn't see this answer on this thread or the (possible duplicated) question here.

我没有在这个线程上看到这个答案或者这里的(可能重复的)问题。

I fixed the issue by:

我解决了这个问题:

  • Opening the Task Manager (ctrl+alt+del)
  • 打开任务管理器(ctrl+alt+del)
  • Under the Processes tab, End the task of IIS Worker Process (This may now be listed as Microsoft.IIS.Worker.Process or something similar) (You may have to click More details at the bottom if you don't see all of the processes)
  • 在Processes选项卡下,结束IIS Worker进程的任务(现在可以将其列为Microsoft.IIS.Worker。进程或类似的东西)(如果看不到所有进程,您可能需要单击底部的更多细节)
  • Then going to the Services tab, Stop the IISADMIN service and the start it up again.
  • 然后转到Services选项卡,停止IISADMIN服务并重新启动它。

Run the program and that should hopefully fix it! Happy Coding and Debugging! :)

运行这个程序,希望能修复它!编码和调试快乐!:)

#10


2  

If you are using HTTPS on localhost, odds are you created a self signed certificate. These have a tendency to expiry on the same day they are created, so you could have to recreate a certificate and add it to the binding of your locally hosted site.

如果您在localhost上使用HTTPS,很可能您创建了一个自签名证书。它们往往在创建的同一天过期,因此您必须重新创建一个证书并将其添加到本地托管站点的绑定中。

#11


2  

in my case, the DefaultAppPool was stopped, I edited the Advanced Settings and set the value of Identity as LocalSystem, after that I start the DefaultAppPool.

在我的示例中,DefaultAppPool已经停止,我编辑了高级设置,并将标识的值设置为LocalSystem,然后启动DefaultAppPool。

#12


2  

I'm running Windows 10 Professional with Visual Studio 2017 and none of the options above worked for me.

我正在用Visual Studio 2017运行Windows 10专业版,上面的所有选项对我都不起作用。

What fixed it for me was adding 'Windows Process Activation Service'.

为我修复的是添加“Windows流程激活服务”。

Start > Type turn windows Features On or Off > Make sure "Windows Process Activation Service" is checked.

启动>类型,打开或关闭>窗口功能,确保“windows进程激活服务”被选中。

Hope it helps someone.

希望它能帮助一些人。

IIS出错,无法在webserver上启动调试

#13


1  

Do you use or have IIS Rewrite installed on your machine? I have a similar problem on my machine but to get round it, I have web.config open as the current page in VS and press f5. I then have to navigate to the page to debug. It seems to work for me.

您是否在您的机器上安装或使用IIS重写?我的机器上也有类似的问题,但为了解决这个问题,我有网络。在VS中设置为打开当前页面并按f5。然后,我必须导航到页面以进行调试。对我来说似乎行得通。

#14


1  

reset your iis in 'Developer Command Prompt for (your visual studio version)'

在“开发人员命令提示符(visual studio版本)”中重置iis

type iisreset in that command prompt & hit enter. it'll reset iis automatically

在命令提示符中键入iisreset,然后按回车键。它会自动重启iis

#15


1  

Just ran into this problem myself and it turned out to be that my site in IIS was set up to use anonymous authentication with a specific network account. I had been forced to reset the password on that account, and so IIS was failing because it was using the old one. Once I updated the site with the new password (or even better, changed it to use Network Service instead), all worked again.

我自己就遇到了这个问题,结果是我在IIS中的站点被设置为使用一个特定的网络帐户来使用匿名身份验证。我*重新设置该帐户的密码,因此IIS失败了,因为它正在使用旧的密码。一旦我用新的密码更新了站点(或者更好的是,将其改为使用网络服务),所有这些都再次工作。

#16


1  

I edited the solution file and changed localhost to my ip address. Before that I had added IIS_IUSRS with full control in the project directory. I can now debug.

我编辑了解决方案文件,并将localhost更改为我的ip地址。在此之前,我已经在项目目录中添加了IIS_IUSRS。我现在可以调试。

#17


1  

go to Search > type services.msc and make sure that ASP.Net State Service is running.

去搜索>类型的服务。确保ASP。Net状态服务正在运行。

#18


1  

In my case this folder was missing:

在我的情况下,这个文件夹不见了:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files

C:\Windows\ Microsoft.NET \ Framework \ v4.0.30319 \临时ASP。网络文件

Adding that folder and the necessary permissions solved it for me.

添加那个文件夹和必要的权限为我解决了这个问题。

#19


1  

Make sure that you etc file in C:\Windows\System32\drivers does not has any other applications with the same name as the one you are getting an error on.

确保你在C:\Windows\System32\drivers不会有任何其他应用程序等文件名称相同的你的一个错误。

I had a Hadoop sandbox configured with the name 'localhost' which was the same as my Visual Studio project which was getting the 'Cannot start debugging on web server' error.

我配置了一个名为“localhost”的Hadoop sandbox,它与我的Visual Studio项目相同,该项目获得了“web服务器无法启动调试”的错误。

Remove those lines and your project should start debugging.

删除这些行,您的项目将开始调试。

#20


0  

I've faced this problem, then I found out that i gotta run Visual Studio as admin in order to debug the project.

我遇到了这个问题,然后我发现我必须以admin的身份运行Visual Studio,以便调试项目。

Hope it helps!

希望它可以帮助!

#21


0  

I had the same issue. The problem was I haven't Framework 4 installed while I had already Framework 4.5 So MIME type ASPX could not be realized without ISAPI 4.0.

我也有同样的问题。问题是我还没有安装框架4,而我已经安装了框架4.5,所以如果没有ISAPI 4.0, MIME类型ASPX就无法实现。

To sort it, I could either uninstalled 4.5 first and add 4.0 then which made trouble or adding specific files to ISAPI restriction and ISAPI filter in the IIS root manually. I needed to grab aspnet_filter.dll and aspnet_isapi.dll located in both C:\Windows\Microsoft.NET\Framework\ and C:\Windows\Microsoft.NET\Framework64\

要对它进行排序,我可以先卸载4.5,然后添加4.0,这会带来麻烦,或者手工在IIS根中添加ISAPI限制和ISAPI过滤器的特定文件。我需要抓取aspnet_filter。dll,aspnet_isapi。dll位于C:\Windows\Microsoft.净\ \和C:\Windows\ Microsoft.NET \ Framework64 \框架

Having added those files, all would be good.

添加了这些文件,一切都会很好。

#22


0  

I resolved this issue. In my case my application pool was stopped. After little bit of Googling i found out that application pool was running under some user identity and password was changed for that user. After updating password it starts working fine.

我解决了这个问题。在我的例子中,我的应用程序池被停止。在我搜索了一小段之后,我发现应用程序池在一些用户标识和密码下运行。更新密码后,开始正常工作。

#23


0  

None of the other solutions worked for me. I resolved this issue by using the commands below.

其他的解决方案对我都不起作用。我使用下面的命令解决了这个问题。

For 32 bit machine:

32位机:

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis –i

For 64 bit machine:

64位机:

C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis –i

The issue is because the web.config file is not installed correctly.

问题在于网络。配置文件没有正确安装。

#24


0  

Thanks for all the answers but none of them worked for me. Although some of them gave me some ideas on what services and stuff that needs to be running to be able "turn on" the debugging of my web app again:

谢谢你所有的答案,但没有一个对我有用。虽然他们中的一些人给了我一些关于哪些服务和东西需要运行才能“打开”我的web应用程序的调试:

  1. Ensure that ASP.Net registered properly with IIS and running. To register it follow @Rahul Tripathi instructions then go to Search > type services.msc and make sure that ASP.Net State Service is running.
  2. 确保ASP。在IIS中正确注册并运行。按照@Rahul Tripathi指令注册它,然后进入搜索>类型的服务。确保ASP。Net状态服务正在运行。
  3. As @Morvael suggested, always run your VS in admin mode.
  4. 正如@Morvael所建议的,始终在管理模式下运行VS。
  5. Check if the app pool where your web app resides is started.
  6. 检查web应用所在的应用程序池是否已经启动。
  7. Ensure that the IIS server itself is running (this what solved the problem for me)
  8. 确保IIS服务器本身正在运行(这为我解决了问题)

I still haven't figured out what is the reason why my IIS stopped. It was working fine yesterday then today it's not. Anyways, I hope this mini checklist helps somebody else. Cheers!

我还没搞清楚我的IIS为什么停止的原因。昨天工作得很好,但今天不行。不管怎样,我希望这个小小的清单能帮助别人。干杯!

#25


0  

Use Microsoft Web Platform Installer to install IIS ASP.NET 4.5

使用Microsoft Web平台安装程序安装IIS ASP。NET 4.5

IIS出错,无法在webserver上启动调试

Found the solution here:

找到了解决方案:

#26


0  

Follow my steps :

按照我的步骤:

  1. Open your web config file .
  2. 打开web配置文件。
  3. See your 'staticContent' tag
  4. 看到你的“staticContent”标签
  5. Delete or commend unwanted setting tag ex: -> < mimeMap fileExtension=".woff" mimeType="application/x-font-woff"/>
  6. 删除或推荐不需要的设置标签ex: -> < mimeMap fileExtension="。woff " mimeType = "的应用程序/ x-font-woff " / >

#27


0  

If you are using active directory login u need to check password and username.

如果您正在使用活动目录登录,您需要检查密码和用户名。

#28


0  

Just one of the 10 sites configured on my Local IIS was giving this error, so I had a feeling that it wasn't anything from the other answers that were machine-wide things, like Turning Windows Features On or Off, or running VS2015 as admin (the other 9 sites worked ok, in the same VS).

只是我的10个网站上配置一个当地IIS给这个错误,所以我有一种感觉,它不是任何东西,从改变机器的其他答案的东西,喜欢把窗户打开或关闭特性,或运行VS2015 admin(其他9网站工作好,在相同的VS)。

The specific error for me was:

我的具体错误是:

Unable to start debugging on the webserver. Operation not supported. Unknown error:0x80004005

无法在webserver上启动调试。操作不支持。未知错误:0 x80004005

The problem turned out to be the web config having a URL Rewrite rule to rewrite HTTP -> HTTPS. Commenting this out resolved the problem

问题是web配置有一个URL重写规则来重写HTTP -> HTTPS。注释掉这个问题就解决了

TL;DR - try disabling all your web.config URL rewrite rules, if you have them (then add them back in gradually, if it helps)

TL;DR -尝试禁用所有web。配置URL重写规则,如果您有它们(然后逐渐添加它们,如果有帮助的话)

#29


0  

In my case it looks like Chrome locking some resources, preventing from debugger to attach. After I closing Chrome, I able to attach again.

在我的例子中,它看起来像Chrome锁定了一些资源,防止调试器附加。在我关闭Chrome之后,我可以再次连接。