amateur
amateur

Reputation: 44605

change localhost domain when running locally

I am using Visual studio as my IDE is developing a .net web application.

I use my local IIS7 web server to run the application.

It runs under the url -> http://localhost/AppName/

I want the change this to -> http://localhost.appname.com/AppName/

I have added the following host file entry 127.0.0.1 localhost.appname.com

This now mean I can access the site via http://localhost.appname.com/AppName/ like I wanted.

I have one issue though, if I run the site via "Start Debugging" (F5), the site runs in the domain http://localhost/AppName/ .

What changes do I need to make to the web application to get it to start with domain http://localhost.appname.com/AppName/

Upvotes: 1

Views: 2802

Answers (1)

Marc Gravell
Marc Gravell

Reputation: 1062770

The startup page can be set via project properties => web. Typically I find the best option is "do nothing" (I'll invoke the page I want in the browser I want manually)

Upvotes: 4

Related Questions