3

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?

Community
  • 1
  • 1
strutsnew
  • 43
  • 5

1 Answers1

3

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>
Dan
  • 29,100
  • 43
  • 148
  • 207
  • I think you don't need a separate site. Just add a second binding to the bindings in the first site. That worked in our case. Thanks @Dan for the hint, though! – Manfred Jul 17 '13 at 02:06