I am working on an ASP.NET project which is physically located at C:\Projects\MyStuff\WebSite2. When I run the app with the Visual Studio debugger it seems that the built in web server considers ‘C:\Projects\MyStuff\’ to be the relative root, not ‘C:\Projects\MyStuff\WebSite2’. Is there a web.config setting or something that will allow tags like <img src='/img/logo.png' /> to render correctly without having to resort to the ASP.NET specific tags like <asp:image />? If I code for the debugger’s peculiarities then when I upload to the production IIS server everthing is off.
How do you resolve this?
you can try this trick that Scott Guthrie posted on his blog http://weblogs.asp.net/scottgu/archive/2006/12/19/tip-trick-how-to-run-a-root-site-with-the-local-web-server-using-vs-2005-sp1.aspx
to cut to the fix: select your project/solution in solution explorer and then open the Properties tab like you would if you were editing a textbox. If you right click and go to "Property Pages" that is the wrong place.