我开发了一个 Asp.net 网站,我可以从我的浏览器和局域网中访问它。现在我尝试发布网站并将发布的网站放在我的虚拟目录中并从我的浏览器访问它。这给了我一个错误。
配置错误
Description: An error occurred during the processing of a configuration file required to service this request.
Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.
This error can be caused by a virtual directory not being configured as an application in IIS.
据我所知,如果站点已发布,那么当我将 URL 提供给包含站点文件的目录时,Default.aspx
应该会自动打开该文件,但我会得到目录列表。如果我从那里打开 Default.aspx,我会收到错误消息。
所以请让我知道为什么当我通过已发布的网站访问时会出现错误,以及访问正在发布或未发布的网站有什么区别?
更新:我的 IIS 屏幕截图: