“无法启动IIS Express Web服务器."在Visual Studio中

编程入门 行业动态 更新时间:2024-10-21 16:07:36
本文介绍了“无法启动IIS Express Web服务器."在Visual Studio中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我试图通过Visual Studio运行我的Web服务.我遇到了类似的问题:

--------------------------- Microsoft Visual Studio --------------------------- Unable to launch the IIS Express Web server. Failed to register URL "localhost:63591/" for site "xxxxxx" application "/". Error description: The process cannot access the file because it is being used by another process. (0x80070020) --------------------------- OK ---------------------------

我看到任务管理器,发现系统使用PID 4,其描述为NT Kernel & System. 因此,我试图停止http service. 所有依赖项服务均已停止.但是我在停止http服务之类的过程中遇到了一个问题

The service is starting or stopping. Please try again later.

因此,我尝试手动停止并启动该服务.但是结束进程被禁用. 如果有人可以帮助解决此问题,这将是有帮助的

解决方案

来自 www.davidsalter.co.uk/unable-to-launch-the-iis-express-web-server-error-0x80070020/

错误代码0x80070020表示ERROR_SHARING_VIOLATION,在IIS Express(或IIS)的情况下,意味着它正在尝试侦听的端口正在由另一个进程使用.

使用netstat命令来找出哪个应用程序正在使用该端口.

netstat -ao | findstr <port_number_to_search_for>

a参数告诉netstat显示所有连接和侦听端口.

o参数告诉netstat显示与连接关联的进程ID.

运行上述netstat命令将产生如下输出:

C:\>netstat -ao | findstr 4026 TCP 12.0.0.1:4026 cs-pc:4026 LISTENING 9544

最后显示的数字(此处为9954)是进程ID.

I attempted to run my web service through visual studio. I faced an issue like :

--------------------------- Microsoft Visual Studio --------------------------- Unable to launch the IIS Express Web server. Failed to register URL "localhost:63591/" for site "xxxxxx" application "/". Error description: The process cannot access the file because it is being used by another process. (0x80070020) --------------------------- OK ---------------------------

I saw the task manager and found that PID 4 is used by System and its Description is NT Kernel & System. So I tried to stop the http service. All dependency services stopped. But I am facing an issue in stopping http service like

The service is starting or stopping. Please try again later.

So, I tried to stop and start the service manually. But the End process is disabled. It will be helpful if anyone could help with this issue

解决方案

From www.davidsalter.co.uk/unable-to-launch-the-iis-express-web-server-error-0x80070020/

Error code 0x80070020 means ERROR_SHARING_VIOLATION, which in the case of IIS Express (or IIS) means that the port that it is attempting to listen on is being used by another process.

Use the netstat command to find out which application is using the port.

netstat -ao | findstr <port_number_to_search_for>

The a parameter tells netstat to display all connections and listening ports.

The o parameter tells netstat to display the process ID associated with the connection.

Running the above netstat command will produce output such as:

C:\>netstat -ao | findstr 4026 TCP 12.0.0.1:4026 cs-pc:4026 LISTENING 9544

The last number displayed (9544 here) is the process ID.

更多推荐

“无法启动IIS Express Web服务器."在Visual Studio中

本文发布于:2023-11-10 22:27:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1576634.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:无法启动   服务器   Express   Web   IIS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!