Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using custom port and domain name with IIS express

Tags:

iis

dns

I have two web applications built with asp.net MVC3. I want to run them locally with custom domain and without any port number in the urls. no need to worry about remote access etc. this is just for local development enivronment only

eg:

htp://app1.cc.com-->Application1

htp://app2.cc.com-->Application2

I need something like htp://app1.cc.com/questions/4709014/using-custom-domains-with-iis-express

currently my URLs are like http://localhost:34752/questions/4709014/using-custom-domains-with-iis-express

I followed the steps in this question:

Using Custom Domains With IIS Express

but this is using the reserved port 80, which is fine but how do I share this port with two applications?

like image 851
strutsnew Avatar asked Dec 11 '25 10:12

strutsnew


1 Answers

Just add bindings in your applicationhost.config

Something like this

<site name="site1" id="1" serverAutoStart="true">
<bindings>
     <binding protocol="http" bindingInformation="*:80:app1.cc.com" />
</bindings>
</site>

<site name="site2" id="2" serverAutoStart="true">
<bindings>
     <binding protocol="http" bindingInformation="*:80:app2.cc.com" />
</bindings>
</site>
like image 197
Dan Avatar answered Dec 16 '25 19:12

Dan