Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I host multiple domains on a GoDaddy shared hosting account. I would like to setup a website locally in IIS 7 that mimics the setup of my hosted account so that I can test and debug applications locally before deploying, as debugging after deploying, or discovering there are issues after deploying is frustrating.

I have created a folder WebRoot, at put my main application in that folder. I created a website in IIS 7 and pointed it at that folder. I setup bindings with a fake domain, and created a matching entry in my hosts file to make the fake domain point at my 127.0.0.1. I then created a folder www.otherdomain.com under webroot. I then created an application underneath my website, and pointed it at this folder. I can't find how I can add bindings to the web application to have it referenced as a different fake domain, rather than a subdirectory under my root domain.

What would be the proper way to setup IIS to best simulate the environment on the GoDaddy servers.

share|improve this question

migrated from stackoverflow.com Jan 4 '10 at 22:40

This question came from our site for professional and enthusiast programmers.

1 Answer 1

Bindings can only be done at site level. They cannot be done at application or folder level.

You have two options:

  1. Create a 2nd IIS site, bind it to your 2nd fake domain, and configure the application in there

  2. Add a 2nd binding to your existing website for your 2nd domain name. Then the site will respond on both domains. You can then use some server-side (or even javascript) code to redirect/reject queries that come in on the domain you don't want.

share|improve this answer
    
Your #2 option seems somewhat likely. If I have a website pointing at the folder /webRoot, and then I create an application inside that website pointing at /webRoot/www.domain1.com then I get some of the same behavior as godaddy. One big difference is in my configuration, the sub application doesn't get web.config values from the root application (website), but on godaddy, it does get those values. However, I'm sure it is not a virtual directory because it allows application level settings in the web.config. –  NerdFury Jan 19 '10 at 17:26
    
Also, www.domain1.com will take me to the /www.domain1.com folder on godaddy, but Action Links created with asp.net mvc append the folder name in the urls generated making them www.domain1.com/www.domain1.com/hom which is not desirable, but I may not have an option there, other than to write my own link generator. –  NerdFury Jan 19 '10 at 17:28
    
@NerdFury have you been able to solve the issue where ASP.Net MVC Html.ActionLink() appends the subfolder? –  alexfreiria Aug 5 '10 at 3:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.