无法启动 ASP.NET 开发服务器,因为端口“1900"正在使用中 [英] Unable to launch the ASP.NET Development server because port '1900' is in use

本文介绍了无法启动 ASP.NET 开发服务器,因为端口“1900"正在使用中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 VS 2008 中开发得很好,并在我的开发服务器上测试我的 ASP.NET 网站,突然我无法再运行我的网站.我一按 F5,就会出现以下消息:

I was developing just fine in VS 2008 and testing my ASP.NET web site on my development server when suddenly I was unable to run my web site anymore. As soon as I hit F5, the message appears:

无法启动 ASP.NET 开发服务器,因为端口1900"正在使用中.

Unable to launch the ASP.NET Development server because port '1900' is in use.

我更改到哪个端口并不重要,它始终在使用中.我试过了:

It doesn't matter what port I change to, it's always in use. I have tried:

  • 更改端口号
  • 重新启动 Visual Studio
  • 重新启动我的机器
  • 安装 IIS

提示:我的 IIS 拒绝启动.但是我之前愉快地工作时没有安装 IIS,所以这可能不是问题;它可能只是突出显示其他内容.

Clue: My IIS refuses to start. But I didn't have IIS installed when I was happily working earlier, so that is probably not the issue; it might just be highlighting something else.

更新:重启后,IIS启动,但问题依旧.

Update: after rebooting, IIS does start, but the problem here persists.

推荐答案

简单地结束所有 Webdev.WebServer.exe 进程 - 对我有用.有时,当 Visual Studio 进程 (webdev.webserver.exe) 之一仍在运行并锁定时,会发生这种由于端口正在使用而无法启动"错误.当您关闭浏览器或应用程序时,webdev.webserver 进程应该结束,但如果它们没有(例如,我的 Visual Studio 崩溃,但如果网络服务器仍在运行),那么这可能会锁定端口,这将阻止 Visual Studio 启动你的项目.当您尝试 F5 应用程序(从 Visual Studio 启动您的应用程序)时,它会与当前使用的端口冲突,并显示上述因为端口 XYZ 正在使用"错误.

Simply end all Webdev.WebServer.exe processes - did the trick for me. Occasionally this 'unable to launch because port is in use' error happens when one of the visual studio processes (webdev.webserver.exe) is still running and locked. The webdev.webserver process(s) should end when you close your browser or app but if they dont (for instance my Visual Studio crashed but if left the webserver still running) then this could lock the port and this will prevent visual studio from launching your project. When you try to F5 your app (launch your application from visual studio) then it conflicts with the current port in use and the above 'because port XYZ is in use' error is displayed.

所以要修复它:在状态栏中(在您的 Windows 时钟旁边)右键单击并停止"所有 ASP.net 开发服务器图标.您也可以打开任务管理器并杀死所有 webdev.webserver.exe 进程.

So to fix it: in the status bar (next to your windows clock) right-click and 'Stop' all the ASP.net development server icons. You can also open task manager and kill all the webdev.webserver.exe processes.

这篇关于无法启动 ASP.NET 开发服务器,因为端口“1900"正在使用中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆