1

I'm trying to do something similar to this post asp.net setting up subdomain on localhost

I have the following added to my hosts file

127.0.0.1       localhost
::1             localhost
127.0.0.1       test1.localhost
127.0.0.1       test2.localhost

I have unchecked everyting under LAN connections as mentioned in the post. HOwever, from within VS 2010, running the application and going to localhost:7217 works. But going to test1.localhost still falls over with an error 'IE could not find test1.localhost'

The application is based on MVC3, so not sure if I should be adding routing related changes to global.ascx. Is this required? What else should I be doing for this to work?
Thank you

6
  • Have you tried going to test1.localhost:7217? Commented Dec 7, 2012 at 9:36
  • Yes, that doesn't work either. Same error as before. Do I need to make the routing change in global.acsx before this will work? Commented Dec 7, 2012 at 9:37
  • why not just make up some domains and add those instead? 127.0.0.1 test1.mytestwebsite.co.uk Commented Dec 7, 2012 at 9:38
  • 1
    Did you add the hostname to the site in IIS? Commented Dec 7, 2012 at 9:39
  • Are you using full IIS as development server or are you using the built in one\iis express? (levelnis beat me to it :)) Commented Dec 7, 2012 at 9:39

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.