我已经在 IIS 中配置了一个带有主机头的网站,这样我就可以调用 url customhostheader/ 并显示该网站。
当我尝试发布我的 web 项目时,我收到 web.config 中的某些部分注册为 allowDefinition=MachineToApplication 的错误。但我无法将网站转换为 IIS 中的应用程序。我只能将虚拟目录转换为 IIS 应用程序,但我不想要更长的 url http://customhostheader/virtualdirectoryname,我更喜欢只有http://customhostheader。
有什么想法我能做什么?
谢谢。