I opened the application as a website from my visualstudio 2010
So the application had this URL
"http://localhost:9698/AppName/Default.aspx"
Later, i added the application as website in IIS 7 and i got this URL
"http://AppName/Default.aspx"
Note : I used Appname in my Host file and Appname as Hostname in my IIS 7 settings..
Now, i need the URL to be “http://localhost/AppName/Default.aspx”
when it runs from IIS…How can i change it ?
The reason i am doing this is, I need to provide this URL to my Facebook App
as Canvas URL. And Facebook dosent accepts “http://AppName/Default.aspx” as
a valid domain. So i need to change the Apps localhost URL to
“http://localhost/AppName/Default.aspx”
How ?
All you need to do is create a virtual directory named ‘AppName’ off of the default web site in IIS manager. Point that virtual directory to the folder that is the root of your web app, and you’re done.
localhostwill already resolve to your loopback address, so nohostsfile modification is necessary, and no IIS host headers will be needed either. Your default web site should handle requests forall unassigned, IIRC. In other words, eliminate any host headers from your default web site. (though I suppose you could uselocalhostas a host header if you really wanted to…)