【发布时间】:2015-11-16 18:26:25
【问题描述】:
我在 IIS 中配置了一个带有主机头的网站,这样我就可以调用 url customhostheader/ 并显示该网站。
当我尝试发布我的 web 项目时,我收到 web.config 中的某些部分注册为 allowDefinition=MachineToApplication 的错误。但我无法将网站转换为 IIS 中的应用程序。我只能将虚拟目录转换为 IIS 应用程序,但我不想要更长的 url http://customhostheader/virtualdirectoryname,我更喜欢只有 http://customhostheader。
有什么想法可以做吗?
谢谢。
【问题讨论】:
-
您无需添加新网站来托管您的代码。相反,您需要添加一个应用程序
标签: asp.net iis hostheader