我有一个ASP。NET MVC 4解决方案。当我尝试使用Visual Studio 2012打开它时,我得到以下错误:

Microsoft Visual Studio 为ASP配置Web https://localhost:。NET 4.5失败。你必须 手动配置此站点的ASP。NET 4.5才能使站点 正确地运行。无法在https://localhost:44300/上找到服务器 本地机器。确保已配置本地IIS服务器 支持安全通信。

尽管解打开了。此外,当我试图从调试菜单运行它时,我得到以下错误:

无法启动IIS Express Web服务器。 指定的起始URL无效。https://localhost:44300/

我无法调试代码。如何摆脱这些错误和调试/运行网站从VS 2012?


当前回答

在我的电脑上运行XAMPP的Apache服务器后,我也遇到了这个问题。为了运行它,我通过在管理员命令提示符上写入net stop http来终止8086端口上的所有进程。我认为杀死进程导致了这个问题。

对我来说,这个问题在完成以下步骤后就解决了;

关闭Visual Studio和SQL Management Studio。 转到服务并启动除SQL Server代理(SQLEXPRESS)之外的所有SQL服务。 转到C:\Users\<您的pc名>\Documents并删除IISExpress文件夹。 重新启动电脑。(我在上面没有发现的新事情) 启动Visual Studio并运行程序。

其他回答

其他的解决方法对我都不起作用。我禁用了“编辑-继续”功能,一切正常:)

我在VS2012中运行我的解决方案时遇到了类似的问题:

无法启动IIS Express Web服务器。 指定的起始URL无效。https://localhost:44301/

我将不正确的项目选择为启动项目。我使云项目启动(右键单击项目->设置为启动项目),一切开始工作正常。

在我的情况下,我允许外部请求到我的IIS Express网站,并配置windows防火墙允许iisexpress.exe,我不能从Visual Studio 2013中启动它。我仍然可以用命令行启动它,它可以很好地服务本地和外部请求。

C:\Program Files (x86)\IIS Express>iisexpress /site:MyWebSiteName

我试着创建一个防火墙规则来允许我的端口,在VS工作之后。

Before you try anything else, make sure you 1. restart visual studio (mostly for refreshing memory resident options from files) and 2. restart your system (mostly for invalid file locking). If your problem is such temporary or self-fixed those will do without changing anything. It worked for me with PC restart. Also if you work on a multi-user project make sure you have the latest workable version - someone else may had check in something invalid by mistake at e.g. the project file and you mess with your system for no reason. If those won't work, then you probably need to alter some setting(s) that are stuck, missing or need modification - there are plenty propositions on other answers.

在解决方案资源管理器中右键单击项目

tab Web,按“创建虚拟目录”