无法启动IIS Express Web服务器,注册URL失败,访问被拒绝

时间:2021-05-02 18:11:44

Some web projects are causing me problems while others work fine. I decided to focus on one of the problematic ones. I'm using Visual Studio 2013 on Windows 7. I think I'm running it as administrator, the window title says PROJECT NAME - Microsoft Visual Studio (Administrator).

一些web项目给我带来了问题,而另一些则运行得很好。我决定专注于其中一个问题。我正在Windows 7上使用Visual Studio 2013。我想我是以管理员的身份运行它,窗口标题上写着项目名称——Microsoft Visual Studio (administrator)。

When I try to run the project I get a popup saying:

当我尝试运行这个项目时,我得到一个弹出窗口说:

Unable to launch the IIS Express Web server.

Failed to register URL "http://localhost:62940/" for site "SITE NAME"
application "/". Error description: Access is denied. (0x80070005).

This does not seem entirely uncommon but I have tried many of the suggestions without luck:

这似乎并非完全不常见,但我尝试了很多没有运气的建议:

  1. Deleted %userprofile%\Documents\IISExpress\, tried to run.

    删除%userprofile%\文件\IISExpress\,尝试运行。

  2. netsh http add urlacl url=http://localhost:62940/ user=everyone, rebooted and tried to run. (Actually user=Alla since Swedish Windows).

    netsh http添加urlacl url=http://localhost:62940/ user=everyone,重新启动并尝试运行。(实际上用户=真主安拉,从瑞典的Windows开始)。

  3. netsh http delete urlacl url=http://localhost:62940/, rebooted and changed from <binding protocol="http" bindingInformation="*:62940:localhost /> to <binding protocol="http" bindingInformation="*:62940:/> in %userprofile%\Documents\IISExpress\config\applicationhost.config and tried to run. (It did changed the error message to say ... URL "http://*:62940/" ....

    netsh http delete urlacl url=http://localhost:62940/,重新启动并从

  4. Reinstalled IIS 8.0 Express

    重新安装IIS 8.0表达

  5. Reinstalled Visual Studio 2013

    重新安装Visual Studio 2013

I'm at my wit's end, what am I doing wrong?

我已经绞尽脑汁了,我做错了什么?

Edit 1: If I change the port of the project (e.g. to 55555) it starts... This is not a desirable solution since these projects are worked on by several people. Maybe the port is blocked by something else? If so, is there an easy way to check by what?

编辑1:如果我将项目的端口(例如55555)更改为……这不是一个理想的解决方案,因为这些项目是由几个人完成的。也许端口被别的东西阻塞了?如果是的话,有没有一种简单的方法来检验什么?

Edit 2: Port 62940 seems to be free. Running netstat does not show any application listening to it. Something else must be wrong.

编辑2:端口62940似乎是免费的。运行netstat不会显示任何正在监听它的应用程序。一定是别的什么地方出错了。

Edit 3: I tried starting the project today after not touching it for a few months. It worked but I don't know why.

编辑3:我今天试着开始这个项目,几个月没碰它了。它起作用了,但我不知道为什么。

29 个解决方案

#1


68  

I solved the error by changing the port for the project.

我通过更改项目的端口来解决这个错误。

I did the following steps:

我做了以下步骤:

1 - Right click on the project.
2 - Go to properties.
3 - Go to Server tab.
4 - On tab section, change the project URL for other port, like 8080 or 3000.

1 -右键单击项目。2 -进入属性。3 -进入服务器选项卡。4 -在选项卡部分,更改其他端口的项目URL,比如8080或3000。

Good luck!

好运!

#2


56  

The ideal way to sort this out is to use the IIS Express tray icon to stop the web site that is causing the problem. To do this, click the little upward-pointing arrow in the right-hand end of the task bar and right-click the IIS Express icon. This will pop up a small window showing you the web sites that IIS Express is currently running...

解决这个问题的理想方法是使用IIS Express tray图标来停止导致问题的web站点。要做到这一点,单击任务栏右边的小向上箭头,右键单击IIS Express图标。这将弹出一个小窗口,向您显示IIS Express当前正在运行的web站点……

无法启动IIS Express Web服务器,注册URL失败,访问被拒绝

If you click on one of the items under "View Sites" you have the option to stop that site. Or, you can click the Exit item at the bottom of the window to stop all web sites.

如果您点击“查看站点”下的一个条目,您可以选择停止该站点。或者,您可以单击窗口底部的Exit项来停止所有web站点。

That should enable you to debug in Visual Studio. When you start debugging again, IIS Express will automatically restart the web site, and should be able to allocate the port.

这将使您能够在Visual Studio中进行调试。当您再次开始调试时,IIS Express将自动重新启动web站点,并且应该能够分配端口。

If that fails, you have to do it the dirty way. Open Windows Task Manager and kill the Microsoft.VisualStudio.Web.Host.exe*32 process, then you can run the project fine. Note that this will kill IIS Express completely, meaning that all web sites will stop, so you'll have to restart each one in VS if you want to debug any others. Try the pop-up icon method first tough as it's cleaner and safer.

如果失败了,你必须用肮脏的方式去做。打开Windows任务管理器,关闭Microsoft.VisualStudio.Web.Host。exe*32进程,然后可以很好地运行项目。请注意,这将完全终止IIS Express,这意味着所有web站点都将停止,因此如果您希望调试其他站点,则必须在VS中重新启动每个站点。首先尝试弹出式图标方法,因为它更干净、更安全。

Don't know if this answers your issue, but it works for me.

不知道这是否能回答你的问题,但对我来说很有效。

Update Thanks to JasonCoder (see comment below) for adding that on Win10, the process is Microsoft.VsHub.Server.HttpHost.exe

感谢JasonCoder(参见下面的评论)在Win10中添加了这个过程,这个过程就是Microsoft.VsHub.Server.HttpHost.exe。

#3


39  

When using Visual Studio 2015 the solution can be a bit different to the previous answers. VS2015 creates a hidden folder .vs under the same folder as your solution file. Under this is a config folder containing applicationhost.config. Deleting this file (or the entire .vs folder) then starting VS2015 to recreate it can fix this error.

在使用Visual Studio 2015时,解决方案可能与之前的答案有点不同。VS2015在与解决方案文件相同的文件夹下创建一个隐藏的.vs文件夹。下面是一个包含application .config的配置文件夹。删除此文件(或整个.vs文件夹),然后启动VS2015重新创建该文件,可以修复此错误。

#4


38  

try (as elevated administrator)

试(管理员)升高

netsh http delete urlacl url=http://*:62940/

#5


26  

Got this error as well lately. Tried all the above fixes, but none worked.

最近也有这个错误。尝试了以上所有的修复,但没有一个有效。

To disable it, type services.msc in command prompt, then right click and disable Internet Connection Sharing. I edited the properties of it as well to disable at startup. Mine looks like so now: services capture screenshot.

要禁用它,输入services。msc在命令提示符中,然后右击并禁用Internet连接共享。我还编辑了它的属性以在启动时禁用它。我的现在看起来是这样的:服务捕获屏幕截图。

#6


22  

I just had a similar issue. I'm not totally sure how to describe the actual fault but it seems like the hostname in the reservation is incorrect. Try this in an elevated command prompt...

我也有类似的问题。我不太确定如何描述实际的错误,但是看起来预订中的主机名是不正确的。在命令提示符中尝试这个…

netsh http delete urlacl url=http://localhost:62940/

netsh http delete urlacl url=http://localhost:62940/

... then ...

…然后……

netsh http add urlacl url=http://*:62940/ user=everyone

netsh http添加urlacl url=http://*:62940/ user=everyone

and restart your site. It should work.

并重新启动您的站点。它应该工作。

#7


14  

I ended up with cleaning the project file (csproj) and the applicationhost.config (iis express) with all entries regarding iis express configuration. After that, it worked.

最后我清理了项目文件(csproj)和applicationhost。配置(iis express),包含关于iis express配置的所有条目。在那之后,它工作。

#8


12  

After trying a number of suggested solutions without success I just rebooted my PC. After that the problem didn't occur anymore.

在尝试了一些建议的解决方案但没有成功之后,我重新启动了我的电脑。在那之后,问题就不再发生了。

#9


9  

If you're having this after installing Visual Studio 2015 and you can see Error messages in System event log such as this: Unable to bind to the underlying transport for [::]:{your_port}. . The IP Listen-Only list may contain a reference ... then you might be missing a registry entry.

如果您在安装Visual Studio 2015之后遇到这种情况,并且您可以在系统事件日志中看到错误消息,比如:无法绑定到用于[:]:{your_port}的底层传输。IP列表只包含引用…那么您可能会丢失一个注册表项。

Run this under administrative command prompt: netsh http add iplisten ipaddress=:: to fix it.

在管理命令提示符:netsh http add iplisten ipaddress=:下运行此命令来修复它。

I found the solution described in detail here

我在这里找到了详细描述的解决方案

#10


9  

This happened with me when I was trying to access my site from a remote location:

当我试图从一个偏远的地方访问我的网站时,这发生在我身上:

At first, applicationhost.config (VS2015) contained the standard:

起初,applicationhost。config (VS2015)包含标准:

<binding protocol="http" bindingInformation="*:64376:localhost" />

In order to access my site from a remote location within the network, I added (step 1):

为了从网络内的远程位置访问我的站点,我添加了(步骤1):

<binding protocol="http" bindingInformation="*:64376:192.168.10.132" />

Then, I entered into CMD with Admin rights (step 2):

然后,我进入CMD的管理权限(第2步):

netsh http add urlacl url=http://*:64376/ user=Everyone

As step 3, I added it a rule to the firewall.

作为步骤3,我向防火墙添加了一条规则。

netsh advfirewall firewall add rule name=”IISExpressWeb” dir=in protocol=tcp localport=64376 profile=private,domain remoteip=localsubnet action=allow

Then, I got this error when trying to run the solution again.

然后,当我再次运行这个解决方案时,我得到了这个错误。

Solution: I seemed to have done everything right, but it did not work until I ran netsh also for the existing localhost rule:

解决方案:我似乎把所有事情都做对了,但是直到我也为现有的localhost规则运行netsh之后,它才开始工作:

netsh http add urlacl url=http://localhost:64376/ user=Everyone

Now, it works again.

现在,它的工作原理。

#11


8  

After all of the steps listed here failed for me I got it working by running VS2015 as administrator.

在这里列出的所有步骤都以失败告终后,我以管理员的身份运行VS2015,使它能够正常工作。

#12


8  

I ran into this same error message, but it looks like it was produced from IIS Express. This article helped me resolve it

我遇到了相同的错误消息,但是看起来它是由IIS Express生成的。这篇文章帮助我解决了这个问题

TL;DR

博士TL;

Run the following command from an Administrative command prompt:

从管理命令提示符运行以下命令:

> netsh http add iplisten ipaddress=::

#13


4  

This happened to me on Windows 10 and VS 2013. Apparently there is a maximum port number IIS Express handles. Ports above 62546 don't work for me.

我在Windows 10和VS 2013上遇到过这种情况。显然,IIS Express句柄有一个最大端口号。62546以上的端口对我没用。

#14


2  

The error can be solved if you just restart Visual Studio. It has the same effect as restarting the Microsoft.VisualStudio.Web.Host.exe*32 process.

只要重新启动Visual Studio,就可以解决这个错误。它与重启Microsoft.VisualStudio.Web.Host具有相同的效果。exe * 32的过程。

#15


2  

My issue turned out to be that I had SSL Enabled on the project settings. I simply disabled this because I did not require SSL for running the project locally.

我的问题是我在项目设置中启用了SSL。我只是禁用了它,因为我不需要SSL在本地运行项目。

In Visual Studio 2015:

在Visual Studio 2015中:

  • Select the project in the Solution Explorer.
  • 在解决方案资源管理器中选择项目。
  • In the Properties window set SSL Enabled to False.
  • 在属性窗口中,设置SSL为False。
  • I was able to run the project.
  • 我能够运行这个项目。

In my situation I was getting an error about port 443 in use because this was the port set on the SSL URL for the project.

在我的情况下,我得到一个关于正在使用的端口443的错误,因为这是项目的SSL URL上的端口设置。

#16


1  

Go to the project "Properties" => "Web", and on the "Servers" section change the port to something else that is not used in and save it. You will be asked to created a virtual directory and click "Yes". Now run the project and it will work now.

转到项目“Properties”=>“Web”,在“Servers”一节中,将端口更改为其他未在其中使用的端口,并将其保存。您将被要求创建一个虚拟目录并单击“Yes”。现在运行这个项目,它现在就可以工作了。

#17


1  

In my case it worked at first and after a while stopped working and IIS Express reported that the port was in use.
netstat -ab showed that Chrome was using the port. After I quit Chrome, it started working again.
I am not sure however, why Chrome would occupy that port.

在我的例子中,它一开始是有效的,过了一段时间就停止了工作,IIS Express报告说该端口正在使用。netstat -ab显示Chrome正在使用端口。在我退出Chrome之后,它又开始工作了。但我不确定,为什么Chrome会占领那个港口。

#18


1  

This happened to me on Windows 7 and VS 2013 while viewing a project on the browser after build. I only had to close the browser "Chrome" then made sure that the port is not in use in my Network Activities using some utility (Kaspersky) then tried again and worked without any problems.

在Windows 7和VS 2013上,我在构建后在浏览器上查看项目时遇到过这种情况。我只需要关闭浏览器“Chrome”,然后使用一些实用工具(卡巴斯基)确保端口不在我的网络活动中使用,然后再次尝试,没有任何问题。

#19


1  

I write it for information.

我写它是为了获取信息。

Delete the file in the project.

删除项目中的文件。

After Clean>Build>Proje Start

清洁后>构建>按工程开始

#20


1  

Running netstat -abn I noticed that the software "Duet Display" was reserving thousands of ports in the ~51000 range.

运行netstat -abn -我注意到软件“Duet Display”在~51000范围内保留了数千个端口。

Closing it solved my problem.

关闭它解决了我的问题。

#21


0  

Sometimes this error my be another Visual Studio version running on the same machine.

有时这个错误是在同一台机器上运行的另一个Visual Studio版本。

#22


0  

Looks like everybody has own problem Just sharing what I did to fix this problem in VS2015 (Windows 8.1), my solution has 6 web sites (not web apps)

看起来每个人都有自己的问题分享我在VS2015 (Windows 8.1)中解决这个问题的方法,我的解决方案有6个网站(不是web应用)

  1. Open your solution file *.sln
  2. 打开您的解决方案文件*.sln
  3. Change in your solution file string VWDPort = "34781" (make it unique in your solution if you have more that 1 web site, I made +2) in notepad.
  4. 您的解决方案文件字符串VWDPort =“34781”(如果您有更多我在记事本中创建的+2网站,请在您的解决方案中设置为唯一)的更改。

See sample solution file ProjectSection(WebsiteProperties):

参见示例解决方案文件ProjectSection(WebsiteProperties):

Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "BOSTONBEANCOFFEE.COM", "Source_WebOfficeV4\BOSTONBEANCOFFEE.COM", "{5106A8F5-401B-4907-981C-F37784DC4E9D}"
ProjectSection(WebsiteProperties) = preProject
    SccProjectName = ""$/PrismRMSystem/VS2012/WebOfficeV4.root/WebOfficeV4", IPYHAAAA"
    SccAuxPath = ""
    SccLocalPath = "..\.."
    SccProvider = "MSSCCI:Microsoft Visual SourceSafe"
    TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
    ProjectReferences = "{04e527c3-bac6-4082-9d39-aad8771b368e}|YBTools.dll;{5d52eaec-42fb-4313-83b8-69e2f55ebf14}|AuthorizeNet.dll;{d8408f53-8f1e-4a71-8b05-76023b09b716}|AuthorizeNet.Helpers.dll;{77ebd08a-de0f-4793-b436-fad6980863e6}|WEBCUSTCONTROLS.dll;"
    Debug.AspNetCompiler.VirtualPath = "/BOSTONBEANCOFFEE.COM"
    Debug.AspNetCompiler.PhysicalPath = "Source_WebOfficeV4\BOSTONBEANCOFFEE.COM\"
    Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\BOSTONBEANCOFFEE.COM\"
    Debug.AspNetCompiler.Updateable = "true"
    Debug.AspNetCompiler.ForceOverwrite = "true"
    Debug.AspNetCompiler.KeyFile = "Key\StrongKey.snk"
    Debug.AspNetCompiler.DelaySign = "false"
    Debug.AspNetCompiler.AllowPartiallyTrustedCallers = "false"
    Debug.AspNetCompiler.FixedNames = "true"
    Debug.AspNetCompiler.Debug = "True"
    Release.AspNetCompiler.VirtualPath = "/BOSTONBEANCOFFEE.COM"
    Release.AspNetCompiler.PhysicalPath = "Source_WebOfficeV4\BOSTONBEANCOFFEE.COM\"
    Release.AspNetCompiler.TargetPath = "PrecompiledWeb\BOSTONBEANCOFFEE.COM\"
    Release.AspNetCompiler.Updateable = "true"
    Release.AspNetCompiler.ForceOverwrite = "true"
    Release.AspNetCompiler.KeyFile = "Key\StrongKey.snk"
    Release.AspNetCompiler.DelaySign = "false"
    Release.AspNetCompiler.AllowPartiallyTrustedCallers = "false"
    Release.AspNetCompiler.FixedNames = "true"
    Release.AspNetCompiler.Debug = "False"      
    VWDPort = "34781"
    SlnRelativePath = "Source_WebOfficeV4\BOSTONBEANCOFFEE.COM\"
EndProjectSection

In my case, I tried to change URL from project properties, restart VS, reboot computer, nothing helped me only this SLN file manipulation fixed my problem.

在我的例子中,我尝试从项目属性中更改URL,重新启动VS,重新启动计算机,没有任何帮助,只有这个SLN文件操作解决了我的问题。

#23


0  

For me this problem was entirely related to a broken install of Oracle ODP tools for VS. I uninstalled and reinstalled and everything was working again.

对我来说,这个问题完全与Oracle ODP工具的坏安装有关。

#24


0  

In Visual Studio 2015:

在Visual Studio 2015中:

  • Find your startup page in your project (eg: mypage.aspx) , and right click on it.
  • 在项目中找到你的启动页面(例如:pagmye.aspx),然后右击它。
  • Click on Set as Start Page.
  • 点击设置为起始页。
  • Right click on the project.
  • 右键单击项目。
  • Click on Properties.
  • 单击属性。
  • Click on the Web Tab on the left.
  • 单击左侧的Web选项卡。
  • In Project URL, enter a different port, such as: http://localhost:1234/
  • 在项目URL中,输入另一个端口,例如:http://localhost:1234/
  • In Start Action, select Specific Page: mypage.aspx or select Specific URL: http://localhost:1234/mypage.aspx?myparam=xxx
  • 在启动操作中,选择特定的页面:mypage。aspx或选择特定URL: http://localhost:1234/mypage.aspx?myparam=xxx

#25


0  

And in my case, it turned out that I didn't have IIS enabled in Control Panel under Windows Features. Reference Image, since SO won't let me upload

在我的例子中,我发现在Windows特性下,我没有在控制面板中启用IIS。参考图片,既然这样不会让我上传

#26


0  

In VS2017. I had to edit my .sln file and had to update the VWDPort = "5010" setting. None of the other solutions posted here worked.

在VS2017。我必须编辑我的.sln文件,并且必须更新VWDPort =“5010”设置。在这里发布的其他解决方案都不起作用。

#27


0  

I solved this issue by killing all instances of iexplorer and iexplorer*32. It looks like Internet Explorer was still in memory holding the port open even though the application window was closed.

我通过杀死iexplorer和iexplorer*32的所有实例来解决这个问题。尽管应用程序窗口已经关闭,但看起来Internet Explorer仍然保留着打开端口的内存。

#28


0  

In my case, I had the setting Override application root URL checked, on the Properties->Web tab. I was using that previously when I was running VS as an administrator, but now that I'm running it in a non-admin account, it causes the error.

在我的例子中,我在属性->Web选项卡上检查了设置覆盖应用程序根URL。我以前在运行VS作为管理员时使用过这个方法,但是现在我在一个非管理帐户中运行它,它会导致错误。

#29


-1  

None of the above worked for me but the solution here https://forums.asp.net/t/1979442.aspx?Cannot+change+the+project+URL+in+project+properties did.

以上方法对我都不起作用,但是这里的解决方案https://forums.asp.asp.net/t/1979442.aspx?不能+改变+ +项目+ URL + +项目+属性。

Once I had the solution file open in notepad I did a find and replace of the port that was causing the problem, saved it and reopened the solution in visual studio. The first time I picked a port number that was only 1 off from the one that was causing my problem and I still got the same error. When I changed to a port that something like 10,000 off it worked. I'm not sure if that makes a difference.

在记事本中打开解决方案文件之后,我找到并替换了导致问题的端口,保存它并在visual studio中重新打开解决方案。第一次我选择一个端口号,它与导致我的问题的端口号只差了1,我还是得到了相同的错误。当我换到一个港口时,大概有1万美元的价格。我不确定这是否会有影响。

#1


68  

I solved the error by changing the port for the project.

我通过更改项目的端口来解决这个错误。

I did the following steps:

我做了以下步骤:

1 - Right click on the project.
2 - Go to properties.
3 - Go to Server tab.
4 - On tab section, change the project URL for other port, like 8080 or 3000.

1 -右键单击项目。2 -进入属性。3 -进入服务器选项卡。4 -在选项卡部分,更改其他端口的项目URL,比如8080或3000。

Good luck!

好运!

#2


56  

The ideal way to sort this out is to use the IIS Express tray icon to stop the web site that is causing the problem. To do this, click the little upward-pointing arrow in the right-hand end of the task bar and right-click the IIS Express icon. This will pop up a small window showing you the web sites that IIS Express is currently running...

解决这个问题的理想方法是使用IIS Express tray图标来停止导致问题的web站点。要做到这一点,单击任务栏右边的小向上箭头,右键单击IIS Express图标。这将弹出一个小窗口,向您显示IIS Express当前正在运行的web站点……

无法启动IIS Express Web服务器,注册URL失败,访问被拒绝

If you click on one of the items under "View Sites" you have the option to stop that site. Or, you can click the Exit item at the bottom of the window to stop all web sites.

如果您点击“查看站点”下的一个条目,您可以选择停止该站点。或者,您可以单击窗口底部的Exit项来停止所有web站点。

That should enable you to debug in Visual Studio. When you start debugging again, IIS Express will automatically restart the web site, and should be able to allocate the port.

这将使您能够在Visual Studio中进行调试。当您再次开始调试时,IIS Express将自动重新启动web站点,并且应该能够分配端口。

If that fails, you have to do it the dirty way. Open Windows Task Manager and kill the Microsoft.VisualStudio.Web.Host.exe*32 process, then you can run the project fine. Note that this will kill IIS Express completely, meaning that all web sites will stop, so you'll have to restart each one in VS if you want to debug any others. Try the pop-up icon method first tough as it's cleaner and safer.

如果失败了,你必须用肮脏的方式去做。打开Windows任务管理器,关闭Microsoft.VisualStudio.Web.Host。exe*32进程,然后可以很好地运行项目。请注意,这将完全终止IIS Express,这意味着所有web站点都将停止,因此如果您希望调试其他站点,则必须在VS中重新启动每个站点。首先尝试弹出式图标方法,因为它更干净、更安全。

Don't know if this answers your issue, but it works for me.

不知道这是否能回答你的问题,但对我来说很有效。

Update Thanks to JasonCoder (see comment below) for adding that on Win10, the process is Microsoft.VsHub.Server.HttpHost.exe

感谢JasonCoder(参见下面的评论)在Win10中添加了这个过程,这个过程就是Microsoft.VsHub.Server.HttpHost.exe。

#3


39  

When using Visual Studio 2015 the solution can be a bit different to the previous answers. VS2015 creates a hidden folder .vs under the same folder as your solution file. Under this is a config folder containing applicationhost.config. Deleting this file (or the entire .vs folder) then starting VS2015 to recreate it can fix this error.

在使用Visual Studio 2015时,解决方案可能与之前的答案有点不同。VS2015在与解决方案文件相同的文件夹下创建一个隐藏的.vs文件夹。下面是一个包含application .config的配置文件夹。删除此文件(或整个.vs文件夹),然后启动VS2015重新创建该文件,可以修复此错误。

#4


38  

try (as elevated administrator)

试(管理员)升高

netsh http delete urlacl url=http://*:62940/

#5


26  

Got this error as well lately. Tried all the above fixes, but none worked.

最近也有这个错误。尝试了以上所有的修复,但没有一个有效。

To disable it, type services.msc in command prompt, then right click and disable Internet Connection Sharing. I edited the properties of it as well to disable at startup. Mine looks like so now: services capture screenshot.

要禁用它,输入services。msc在命令提示符中,然后右击并禁用Internet连接共享。我还编辑了它的属性以在启动时禁用它。我的现在看起来是这样的:服务捕获屏幕截图。

#6


22  

I just had a similar issue. I'm not totally sure how to describe the actual fault but it seems like the hostname in the reservation is incorrect. Try this in an elevated command prompt...

我也有类似的问题。我不太确定如何描述实际的错误,但是看起来预订中的主机名是不正确的。在命令提示符中尝试这个…

netsh http delete urlacl url=http://localhost:62940/

netsh http delete urlacl url=http://localhost:62940/

... then ...

…然后……

netsh http add urlacl url=http://*:62940/ user=everyone

netsh http添加urlacl url=http://*:62940/ user=everyone

and restart your site. It should work.

并重新启动您的站点。它应该工作。

#7


14  

I ended up with cleaning the project file (csproj) and the applicationhost.config (iis express) with all entries regarding iis express configuration. After that, it worked.

最后我清理了项目文件(csproj)和applicationhost。配置(iis express),包含关于iis express配置的所有条目。在那之后,它工作。

#8


12  

After trying a number of suggested solutions without success I just rebooted my PC. After that the problem didn't occur anymore.

在尝试了一些建议的解决方案但没有成功之后,我重新启动了我的电脑。在那之后,问题就不再发生了。

#9


9  

If you're having this after installing Visual Studio 2015 and you can see Error messages in System event log such as this: Unable to bind to the underlying transport for [::]:{your_port}. . The IP Listen-Only list may contain a reference ... then you might be missing a registry entry.

如果您在安装Visual Studio 2015之后遇到这种情况,并且您可以在系统事件日志中看到错误消息,比如:无法绑定到用于[:]:{your_port}的底层传输。IP列表只包含引用…那么您可能会丢失一个注册表项。

Run this under administrative command prompt: netsh http add iplisten ipaddress=:: to fix it.

在管理命令提示符:netsh http add iplisten ipaddress=:下运行此命令来修复它。

I found the solution described in detail here

我在这里找到了详细描述的解决方案

#10


9  

This happened with me when I was trying to access my site from a remote location:

当我试图从一个偏远的地方访问我的网站时,这发生在我身上:

At first, applicationhost.config (VS2015) contained the standard:

起初,applicationhost。config (VS2015)包含标准:

<binding protocol="http" bindingInformation="*:64376:localhost" />

In order to access my site from a remote location within the network, I added (step 1):

为了从网络内的远程位置访问我的站点,我添加了(步骤1):

<binding protocol="http" bindingInformation="*:64376:192.168.10.132" />

Then, I entered into CMD with Admin rights (step 2):

然后,我进入CMD的管理权限(第2步):

netsh http add urlacl url=http://*:64376/ user=Everyone

As step 3, I added it a rule to the firewall.

作为步骤3,我向防火墙添加了一条规则。

netsh advfirewall firewall add rule name=”IISExpressWeb” dir=in protocol=tcp localport=64376 profile=private,domain remoteip=localsubnet action=allow

Then, I got this error when trying to run the solution again.

然后,当我再次运行这个解决方案时,我得到了这个错误。

Solution: I seemed to have done everything right, but it did not work until I ran netsh also for the existing localhost rule:

解决方案:我似乎把所有事情都做对了,但是直到我也为现有的localhost规则运行netsh之后,它才开始工作:

netsh http add urlacl url=http://localhost:64376/ user=Everyone

Now, it works again.

现在,它的工作原理。

#11


8  

After all of the steps listed here failed for me I got it working by running VS2015 as administrator.

在这里列出的所有步骤都以失败告终后,我以管理员的身份运行VS2015,使它能够正常工作。

#12


8  

I ran into this same error message, but it looks like it was produced from IIS Express. This article helped me resolve it

我遇到了相同的错误消息,但是看起来它是由IIS Express生成的。这篇文章帮助我解决了这个问题

TL;DR

博士TL;

Run the following command from an Administrative command prompt:

从管理命令提示符运行以下命令:

> netsh http add iplisten ipaddress=::

#13


4  

This happened to me on Windows 10 and VS 2013. Apparently there is a maximum port number IIS Express handles. Ports above 62546 don't work for me.

我在Windows 10和VS 2013上遇到过这种情况。显然,IIS Express句柄有一个最大端口号。62546以上的端口对我没用。

#14


2  

The error can be solved if you just restart Visual Studio. It has the same effect as restarting the Microsoft.VisualStudio.Web.Host.exe*32 process.

只要重新启动Visual Studio,就可以解决这个错误。它与重启Microsoft.VisualStudio.Web.Host具有相同的效果。exe * 32的过程。

#15


2  

My issue turned out to be that I had SSL Enabled on the project settings. I simply disabled this because I did not require SSL for running the project locally.

我的问题是我在项目设置中启用了SSL。我只是禁用了它,因为我不需要SSL在本地运行项目。

In Visual Studio 2015:

在Visual Studio 2015中:

  • Select the project in the Solution Explorer.
  • 在解决方案资源管理器中选择项目。
  • In the Properties window set SSL Enabled to False.
  • 在属性窗口中,设置SSL为False。
  • I was able to run the project.
  • 我能够运行这个项目。

In my situation I was getting an error about port 443 in use because this was the port set on the SSL URL for the project.

在我的情况下,我得到一个关于正在使用的端口443的错误,因为这是项目的SSL URL上的端口设置。

#16


1  

Go to the project "Properties" => "Web", and on the "Servers" section change the port to something else that is not used in and save it. You will be asked to created a virtual directory and click "Yes". Now run the project and it will work now.

转到项目“Properties”=>“Web”,在“Servers”一节中,将端口更改为其他未在其中使用的端口,并将其保存。您将被要求创建一个虚拟目录并单击“Yes”。现在运行这个项目,它现在就可以工作了。

#17


1  

In my case it worked at first and after a while stopped working and IIS Express reported that the port was in use.
netstat -ab showed that Chrome was using the port. After I quit Chrome, it started working again.
I am not sure however, why Chrome would occupy that port.

在我的例子中,它一开始是有效的,过了一段时间就停止了工作,IIS Express报告说该端口正在使用。netstat -ab显示Chrome正在使用端口。在我退出Chrome之后,它又开始工作了。但我不确定,为什么Chrome会占领那个港口。

#18


1  

This happened to me on Windows 7 and VS 2013 while viewing a project on the browser after build. I only had to close the browser "Chrome" then made sure that the port is not in use in my Network Activities using some utility (Kaspersky) then tried again and worked without any problems.

在Windows 7和VS 2013上,我在构建后在浏览器上查看项目时遇到过这种情况。我只需要关闭浏览器“Chrome”,然后使用一些实用工具(卡巴斯基)确保端口不在我的网络活动中使用,然后再次尝试,没有任何问题。

#19


1  

I write it for information.

我写它是为了获取信息。

Delete the file in the project.

删除项目中的文件。

After Clean>Build>Proje Start

清洁后>构建>按工程开始

#20


1  

Running netstat -abn I noticed that the software "Duet Display" was reserving thousands of ports in the ~51000 range.

运行netstat -abn -我注意到软件“Duet Display”在~51000范围内保留了数千个端口。

Closing it solved my problem.

关闭它解决了我的问题。

#21


0  

Sometimes this error my be another Visual Studio version running on the same machine.

有时这个错误是在同一台机器上运行的另一个Visual Studio版本。

#22


0  

Looks like everybody has own problem Just sharing what I did to fix this problem in VS2015 (Windows 8.1), my solution has 6 web sites (not web apps)

看起来每个人都有自己的问题分享我在VS2015 (Windows 8.1)中解决这个问题的方法,我的解决方案有6个网站(不是web应用)

  1. Open your solution file *.sln
  2. 打开您的解决方案文件*.sln
  3. Change in your solution file string VWDPort = "34781" (make it unique in your solution if you have more that 1 web site, I made +2) in notepad.
  4. 您的解决方案文件字符串VWDPort =“34781”(如果您有更多我在记事本中创建的+2网站,请在您的解决方案中设置为唯一)的更改。

See sample solution file ProjectSection(WebsiteProperties):

参见示例解决方案文件ProjectSection(WebsiteProperties):

Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "BOSTONBEANCOFFEE.COM", "Source_WebOfficeV4\BOSTONBEANCOFFEE.COM", "{5106A8F5-401B-4907-981C-F37784DC4E9D}"
ProjectSection(WebsiteProperties) = preProject
    SccProjectName = ""$/PrismRMSystem/VS2012/WebOfficeV4.root/WebOfficeV4", IPYHAAAA"
    SccAuxPath = ""
    SccLocalPath = "..\.."
    SccProvider = "MSSCCI:Microsoft Visual SourceSafe"
    TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
    ProjectReferences = "{04e527c3-bac6-4082-9d39-aad8771b368e}|YBTools.dll;{5d52eaec-42fb-4313-83b8-69e2f55ebf14}|AuthorizeNet.dll;{d8408f53-8f1e-4a71-8b05-76023b09b716}|AuthorizeNet.Helpers.dll;{77ebd08a-de0f-4793-b436-fad6980863e6}|WEBCUSTCONTROLS.dll;"
    Debug.AspNetCompiler.VirtualPath = "/BOSTONBEANCOFFEE.COM"
    Debug.AspNetCompiler.PhysicalPath = "Source_WebOfficeV4\BOSTONBEANCOFFEE.COM\"
    Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\BOSTONBEANCOFFEE.COM\"
    Debug.AspNetCompiler.Updateable = "true"
    Debug.AspNetCompiler.ForceOverwrite = "true"
    Debug.AspNetCompiler.KeyFile = "Key\StrongKey.snk"
    Debug.AspNetCompiler.DelaySign = "false"
    Debug.AspNetCompiler.AllowPartiallyTrustedCallers = "false"
    Debug.AspNetCompiler.FixedNames = "true"
    Debug.AspNetCompiler.Debug = "True"
    Release.AspNetCompiler.VirtualPath = "/BOSTONBEANCOFFEE.COM"
    Release.AspNetCompiler.PhysicalPath = "Source_WebOfficeV4\BOSTONBEANCOFFEE.COM\"
    Release.AspNetCompiler.TargetPath = "PrecompiledWeb\BOSTONBEANCOFFEE.COM\"
    Release.AspNetCompiler.Updateable = "true"
    Release.AspNetCompiler.ForceOverwrite = "true"
    Release.AspNetCompiler.KeyFile = "Key\StrongKey.snk"
    Release.AspNetCompiler.DelaySign = "false"
    Release.AspNetCompiler.AllowPartiallyTrustedCallers = "false"
    Release.AspNetCompiler.FixedNames = "true"
    Release.AspNetCompiler.Debug = "False"      
    VWDPort = "34781"
    SlnRelativePath = "Source_WebOfficeV4\BOSTONBEANCOFFEE.COM\"
EndProjectSection

In my case, I tried to change URL from project properties, restart VS, reboot computer, nothing helped me only this SLN file manipulation fixed my problem.

在我的例子中,我尝试从项目属性中更改URL,重新启动VS,重新启动计算机,没有任何帮助,只有这个SLN文件操作解决了我的问题。

#23


0  

For me this problem was entirely related to a broken install of Oracle ODP tools for VS. I uninstalled and reinstalled and everything was working again.

对我来说,这个问题完全与Oracle ODP工具的坏安装有关。

#24


0  

In Visual Studio 2015:

在Visual Studio 2015中:

  • Find your startup page in your project (eg: mypage.aspx) , and right click on it.
  • 在项目中找到你的启动页面(例如:pagmye.aspx),然后右击它。
  • Click on Set as Start Page.
  • 点击设置为起始页。
  • Right click on the project.
  • 右键单击项目。
  • Click on Properties.
  • 单击属性。
  • Click on the Web Tab on the left.
  • 单击左侧的Web选项卡。
  • In Project URL, enter a different port, such as: http://localhost:1234/
  • 在项目URL中,输入另一个端口,例如:http://localhost:1234/
  • In Start Action, select Specific Page: mypage.aspx or select Specific URL: http://localhost:1234/mypage.aspx?myparam=xxx
  • 在启动操作中,选择特定的页面:mypage。aspx或选择特定URL: http://localhost:1234/mypage.aspx?myparam=xxx

#25


0  

And in my case, it turned out that I didn't have IIS enabled in Control Panel under Windows Features. Reference Image, since SO won't let me upload

在我的例子中,我发现在Windows特性下,我没有在控制面板中启用IIS。参考图片,既然这样不会让我上传

#26


0  

In VS2017. I had to edit my .sln file and had to update the VWDPort = "5010" setting. None of the other solutions posted here worked.

在VS2017。我必须编辑我的.sln文件,并且必须更新VWDPort =“5010”设置。在这里发布的其他解决方案都不起作用。

#27


0  

I solved this issue by killing all instances of iexplorer and iexplorer*32. It looks like Internet Explorer was still in memory holding the port open even though the application window was closed.

我通过杀死iexplorer和iexplorer*32的所有实例来解决这个问题。尽管应用程序窗口已经关闭,但看起来Internet Explorer仍然保留着打开端口的内存。

#28


0  

In my case, I had the setting Override application root URL checked, on the Properties->Web tab. I was using that previously when I was running VS as an administrator, but now that I'm running it in a non-admin account, it causes the error.

在我的例子中,我在属性->Web选项卡上检查了设置覆盖应用程序根URL。我以前在运行VS作为管理员时使用过这个方法,但是现在我在一个非管理帐户中运行它,它会导致错误。

#29


-1  

None of the above worked for me but the solution here https://forums.asp.net/t/1979442.aspx?Cannot+change+the+project+URL+in+project+properties did.

以上方法对我都不起作用,但是这里的解决方案https://forums.asp.asp.net/t/1979442.aspx?不能+改变+ +项目+ URL + +项目+属性。

Once I had the solution file open in notepad I did a find and replace of the port that was causing the problem, saved it and reopened the solution in visual studio. The first time I picked a port number that was only 1 off from the one that was causing my problem and I still got the same error. When I changed to a port that something like 10,000 off it worked. I'm not sure if that makes a difference.

在记事本中打开解决方案文件之后,我找到并替换了导致问题的端口,保存它并在visual studio中重新打开解决方案。第一次我选择一个端口号,它与导致我的问题的端口号只差了1,我还是得到了相同的错误。当我换到一个港口时,大概有1万美元的价格。我不确定这是否会有影响。