IIS Express Subdomain URL

I am looking for a solution for the catch subdomain URL in IIS Express.

Basically, I looked around and found how to create domains / subdomains in IIS Express.

It was pretty easy to find, and all I had to do was add another binding to ApplicationHost.config for IIS Express and change my hosts file to item 127.0.0.1 in the domain.

This is the IIS express configuration file:

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

However, I could not find a way to create a URL for everyone. Perhaps I had an interception somewhere, I even tried (perhaps naively) *:80:*.domain.com and *:80:* .

Another question I was looking for, but cannot answer, is required for all IIS expressions for the full URL (as is the case, each request must go through IIS Express for a specific port).

If this is important, I am using the ASP.NET MVC 3 application.

+8
asp.net-mvc-3 iis-express
source share
2 answers

Unfortunately, I do not think this is possible because IIS does not support wildcard domains. The following sites describe possible workarounds.

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

https://serverfault.com/questions/165660/wildcard-subdomains-on-localhost-using-iis7

Wildcard Subdomains in IIS7. Is it possible to make them the same as in Apache?

The following article explains how IIS bindings work. In connection with your second question, the article says:

The shortest possible binding is reserved for servers with the same IP address and site, or if you want to have a catch-all site when there is no other binding suitable. This binding, which uses the IP address wildcard and without the host header, will be applied absolutely the last, when no other match can be found. In this case, the binding case will be simple:

http *: 80:

+8
source share

I am not familiar with IIS Express, but usually, if you do not specify a host name field, IIS will serve all requests for all domains on the website by default. Thus, you basically become attached to 127.0.0.1:80 and that you will β€œcatch” everything.

But, as I said, I do not know if IIS Express works this way or not.

0
source share

All Articles