我有一个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?


当前回答

我的解决方案是从IIS Express切换到本地IIS。 确保您的虚拟目录绑定到相同的端口。

其他回答

一直在乱搞IISExpress和项目,试图让它在一个不同的URL上监听,而不是localhost,当返回时,我有这个错误,在遵循这里的所有答案后,没有一个工作。

最终注意到,在项目Porperties -> Web中,我在开始操作下检查了“开始URL”,但输入框是空的。将此更改为“当前页面”修复了我的问题。

请查看快照,我遇到了同样的错误,但下面的设置解决了它

选择“当前页”为“开始操作” 在Servers选项中选择特定的端口并输入端口26641,在虚拟路径中输入/ NTLM选项应未选中

关闭Visual Studio的所有实例。 打开任务管理器。 结束所有活动的IIS进程。 重新启动Visual Studio。

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.

首先删除目录中存在的文件IISEXPRESS,然后开始调试。

如果这不能解决问题,转到您的项目(Ctrl+Alt+L)。右键单击->属性->调试和检查“启用Windows身份验证”。