asp.net – IIS Express全能子域名网址

前端之家收集整理的这篇文章主要介绍了asp.net – IIS Express全能子域名网址前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在寻找IIS Express中子域catch-all url的解决方案.

基本上,我环顾四周,找到了如何在IIS Express中创建域/子域.

它很容易找到,我所要做的就是在IIS Express的ApplicationHost.config中添加另一个绑定,并将我的hosts文件更改为127.0.0.1到域.

这是IIS express配置文件

<binding protocol="http" bindingInformation="*:80:domain.com" />
<binding protocol="http" bindingInformation="*:80:sub.domain.com" />

但是,我找不到任何方法来创建一个包罗万象的URL.在某个地方可能有一个人的视线,我甚至尝试过(可能是天真的)*:80:*.domain.com和*:80:*.

搜索但无法回答的另一个问题是将IIS表达式完全绑定到一个catch-all网址(例如,每个请求都应通过IIS Express传递给特定端口).

如果重要我正在使用ASP.NET MVC 3应用程序.

解决方法

不幸的是,我不相信这是可能的,因为IIS不支持通配符域.以下站点详细介绍了可能的解决方法.

http://forums.iis.net/t/1095760.aspx

http://www.jb51.cc/article/p-okkxvflc-bub.html

Wildcard subdomains in IIS7. Is it possible to make them like it is in Apache?

以下article解释了IIS绑定的工作原理.关于你的第二个问题,文章指出:

The shortest possible binding is
reserved for servers with a single IP
and site,or if you wish to have a
“catch-all” site when no other binding
fits. This binding,which uses the IP
wildcard and no host header,would be
applied absolutely last when no other
binding match could be found. In this
case the binding will simply be:

http *:80:

原文链接:https://www.f2er.com/aspnet/248197.html

猜你在找的asp.Net相关文章