Iis 无法打开网站';http://localhost/XYZ'. 无法读取与解决方案关联的某些属性

Iis 无法打开网站';http://localhost/XYZ'. 无法读取与解决方案关联的某些属性,iis,visual-studio-2019,Iis,Visual Studio 2019,我将一个web应用程序复制到本地的开发机器上。在Visual Studio 2019中打开解决方案时,出现以下错误: Unable to open the Web site 'http://localhost/XYZ'. The Web site 'http://localhost/XYZ' does not exist. Some of the properties associated with the solution could not be read. 我发现了类似的问题和答案:

我将一个web应用程序复制到本地的开发机器上。在Visual Studio 2019中打开解决方案时,出现以下错误:

Unable to open the Web site 'http://localhost/XYZ'.  The Web site 'http://localhost/XYZ' does not 
exist. Some of the properties associated with the solution could not be read.
我发现了类似的问题和答案:


但错误消息中指示的目录不同。我的错误是专门针对“http://localhost/...". 我已经用Visual Studio开发了好几年,我也用过一些IIS——配置应用程序池并将目录转换为网站——但仅此而已。你知道我在这里遗漏了什么吗?

你可以尝试以下步骤来解决你的问题:

  • 单击开始,然后单击控制面板
  • 单击程序和功能
  • 单击打开或关闭Windows功能
  • 在对话框中,展开Internet信息服务
  • 展开Web管理工具,然后展开IIS 6管理 兼容性
  • 单击以选择IIS元数据库和IIS 6配置 “兼容性”复选框,然后单击“确定”。

  • 当我打开包含该文件夹的网站时,它就打开得很好。我不知道为什么它仍然有一个解决方案文件?你的意思是,在你发布后,解决方案文件仍然存在于文件夹中吗?您是如何发布应用程序的?