built-in web server - change virtual root to "/" rather then "/projectname"?
For various reasons time to time I'd like to not run my projects with the built-in web server with a path matching my project name. More specifically, I would just like to preview the web app running in the root of the temporary server. For example, instead of it loading
http://localhost:[port]/myprojectname/default.aspx
I'd like to use...
http://localhost:[port]/default.aspx
If I'm working on a project that will run it's own website it's easiest to reference various documents such as CSS and JS files with absolute paths ("/js/file.js") rather then relatives like "http://js/file.js", etc.
Can this be done? Am I missing a setting / preference somewhere?
Thanks,
Steve
I don't think there is any way to do this within Visual Studio itself, however you can run the WebServer manually:
webdev.webserver /port:1000 /path:d:\Project\MyWeb
This will run the web server on port 1000 and the MyWeb folder will be running within the root of the server.
WebDev.WebServer.exe is located within the .NET Framework directory, typically in the following folder:
c:\Windows\Microsoft.NET\Framework\[Version]