SYSK 250: How To Start ASP.NET Development Server Without Visual Studio
Since the introduction of the file system based web projects, the developers life has been greatly improved… That is unless you have to do a demo, or have other reasons why you don’t want to run Visual Studio in the background. So, your options are:
- Convert it to an HTTP based web site and use IIS
- Figure out the magic Visual Studio does to run it without IIS
As it turns out, option #2 is not that difficult. Visual Studio simply uses WebDev.WebServer.exe process as a host and listener of your requests (the executable can be found in C:\Windows\Microsoft.NET\Framework\v2.0.50727 folder).
To start it, use the following command:
start /B WebDev.WebServer [/port:<port number>] /path:<physical path> [/vpath:<virtual path>]
For example:
start /B webdev.webserver.exe /port:4955 /path:"c:\Projects\YourWebSite" /vpath:/
That’s it…
Comments
Anonymous
November 30, 2006
Aaah, thanks. Really good tip. Great work. You the... girl!Anonymous
November 30, 2006
Does this comment get posted? I'm tring to post some helpful programs/reg code that I've found that are relevant to WebDev.WebServer, but not sure if the comments come up. Maybe being Spam blocked. The first one is by Robert McLaws: http://weblogs.asp.net/rmclaws/archive/2005/10/25/428422.aspx The second one is by Daniel Fisher: http://www.lennybacon.com/CoolToolCassiniHerePowerToy.aspx Hope you and others find them helpful because I know I did!Anonymous
December 01, 2006
And the good thing about this is once it's running, you can attach the VS debugger to it - useful if you have a large solution or (like me) one with a web deployment project in it, and the whole lot takes ages to run inside VS.Anonymous
December 25, 2006
Actually we are using the new project or installation first, we are start the webserver, still i forget that. anybodies are help me regards sathisAnonymous
March 19, 2007
Just what I was looking for! Thanks.Anonymous
September 25, 2007
Thats what i m looking for. thanks