Wednesday, November 25, 2009

Microsoft Web Development Server Command Line

If you ever need to host a web site on your machine (for testing or whatever), you can use the Microsoft Web Development Server (Visual Studio runs this from the IDE) manually via the command line.

I found this particularly useful to test deployment builds (eg: msdeploy) if you don’t have IIS!

There appears to be some confusion over where this EXE lives, but on my machine it is here:

C:\Program Files\Common Files\Microsoft Shared\DevServer\9.0\webdev.webserver.exe

All you need to do is give it a port, a file path, and the name of the virtual directory to use.

Example:

"C:\Program Files\Common Files\Microsoft Shared\DevServer\9.0\webdev.webserver.exe" /port:4955 /path:"C:\Build\Test\DotNet\Test.Project.Web" /vpath:/TestProj

4 comments:

Anonymous said...

Your blog keeps getting better and better! Your older articles are not as good as newer ones you have a lot more creativity and originality now keep it up!

Anonymous said...

第一忠誠,第二勤奮,第三專心工作。..................................................

Anonymous said...

Learning makes life sweet.......................................................................

Anonymous said...

一個人的價值,應該看他貢獻了什麼,而不是他取得了什麼............................................................