How to Run ASP.net Development Server from Command Line?

If you want to run ASP.NET Development Server without opening Visual Studio, you can run it by command line.

For example let's say the website project folder is C:\test\website1.

Open the command line and type the following (1 line) command to run the project:

"C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\webdev.webserver40.exe" /port:99 /path:"C:\test\website1"

You will get notify on system tray. Then you can access the project from browser by  the address: http://localhost:99/

This is for ASP.NET v4. If you want to ASP.net v2 you can use webdev.webserver20.exe

You can also change the port number.

Alternative: Mono XSP Server

If Mono for Windows installed, you can also use XSP server for testing asp.net projects by opening Mono Command Prompt and then use the below command

xsp4 --root "C:\test\website1"

Then you can access the project from browser by  the address: http://localhost:8080/

The default port is 8080. You can change it by the parameter: --port

For asp.net v2 you can use xsp2.

By the way, Mono not successful with VB codes.  It's working good with C#.

Editor: editor | Publish: 2012/07/03 | View: 16604

Yorumlar

6 + 3 =
TIMTIM,RONALD D. 2014-01-01 12:30:14
It worked..very nice
Vishnu 2013-11-26 09:18:30
Thanks, it worked
Home | Search | Contact | Terms
Editor