Using the ASP.NET Development Server

Not everyone knows that the ASP.NET Development Server is not part of Visual Studio, but, in fact, is part of the .NET Framework 2.0.


The ASP.NET Development Server is an executable (WebDev.WebServer.EXE) located in the framework installation directory (usually: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727).


To find out how to use it you one just has to run the executable. Nevertheless, here are the instructions:


ASP.NET Development Server Usage:
WebDev.WebServer /port:<port number> /path:<physical path> [/vpath:<virtual path>]

port number:
[Optional] An unused port number between 1 and 65535.
The default is 80 (usable if you do not also have IIS listening on the same port).

physical path:
A valid directory name where the Web application is rooted.

virtual path:
[Optional] The virtual path or application root in the form of ‘/<app name>’.
The default is simply ‘/’.

Example:
WebDev.WebServer /port:8080 /path:”c:\inetpub\wwwroot\MyApp” /vpath:”/MyApp”

You can then access the Web application using a URL of the form:
http://localhost:8080/MyApp

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>