Click here to Skip to main content
11,705,212 members (41,990 online)
Click here to Skip to main content

Tagged as

Run ASP.NET Web Application from Command Prompt

, 8 Mar 2011 CPOL 57.6K 51
Rate this:
Please Sign up or sign in to vote.
Run ASP.NET Web Application from Command Prompt

Visual Studio has its own integrated ASP.NET Runtime engine, which helps to run any ASP.NET web application within Visual Studio. While running application from Visual Studio, you must have seen a popup notification in System Tray (as shown in the below image), which is a notification of ASP.NET Development Server.

image

This ASP.NET Development Server is nothing but an executable file (WebDev.WebServer) which used by Visual Studio to execute you web application when it’s running in the context of Visual Studio. You can find the executable file at <\Program Files (x86)\Common Files\microsoft shared\DevServer\10.0>. This folder contains two different executables:

  • WebDev.WebServer20.EXE
  • WebDev.WebServer40.EXE

WebDev.WebServer20 is targeted to CLR 2.0, which means all the ASP.NET applications which are targeted till FW .NET 3.5 will be taken care by WebDev.WebServer20.EXE and WebDev.WebServer40.EXE for ASP.NET 4.0 based application.

Now, let’s see how we can use these executables to run an ASP.NET 4.0 application without using Visual Studio. Surprised smile

Step 1: Open the Command Prompt for “Program Files (x86)\Common Files\microsoft shared\DevServer\10.0”.

image

Easiest way to go there, type Cmd in the address bar (If you are using Win 7), this will directly open command prompt with exact path.

image

Pointing up Source for this cmd Tip: http://twitter.com/#!/pbrooks/status/35734806549495808 Thumbs up

Step 2: [Optional] Type WebDev.WebServer40 and Press Enter, this will open a popup window with the details of required parameter.

image

Step 3: If you are done with review, type below command in your command prompt:

image

Note: Port number should be valid and not be used by any other process and path is location of your published web apps.

Step 4: Once done, press Enter, you will see a pop up notification in system tray.

image

If you double click on that icon, you will get the below window of ASP.NET Development server, which is exactly the same notification window which we used to get when we run some ASP.NET application from Visual Studio.

image

This indicates your application is running now.

Step 4: Open IE > Type http://localhost:<portnumber>, you are there !Winking smile

image


Filed under: ASP.NET, Tips and Tricks, Visual Studio

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Abhijit Jana
Technical Lead
India India
.NET Consultant | Former Microsoft MVP - ASP.NET | CodeProject MVP, Mentor, Insiders| Technology Evangelist | Author | Speaker | Geek | Blogger | Husband

Blog : http://abhijitjana.net
Web Site : http://dailydotnettips.com
Twitter : @AbhijitJana
My Kinect Book : Kinect for Windows SDK Programming Guide

You may also be interested in...

Comments and Discussions

 
GeneralWorked gr8 Pin
karthick19892-May-11 23:30
memberkarthick19892-May-11 23:30 
GeneralRe: Worked gr8 Pin
Abhijit Jana3-May-11 1:19
mvpAbhijit Jana3-May-11 1:19 
GeneralMy vote of 5 Pin
karthick19892-May-11 23:08
memberkarthick19892-May-11 23:08 
Answer[My vote of 1] It does not work in Windows XP professional service pack 2 Pin
rajneeshrai2-May-11 19:41
memberrajneeshrai2-May-11 19:41 
GeneralRe: [My vote of 1] It does not work in Windows XP professional service pack 2 Pin
Abhijit Jana2-May-11 19:53
mvpAbhijit Jana2-May-11 19:53 
GeneralMy vote of 5 Pin
Abhishek Sur27-Apr-11 11:51
mvpAbhishek Sur27-Apr-11 11:51 
GeneralMy vote of 5 Pin
Ankur\m/22-Apr-11 1:03
memberAnkur\m/22-Apr-11 1:03 
General[My vote of 2] Whats the use in practical dev Pin
tejinderjoshi20-Apr-11 22:38
membertejinderjoshi20-Apr-11 22:38 
GeneralRe: [My vote of 2] Whats the use in practical dev Pin
Abhijit Jana21-Apr-11 22:32
mvpAbhijit Jana21-Apr-11 22:32 
GeneralRe: [My vote of 2] Whats the use in practical dev Pin
Brij21-Apr-11 23:13
mvpBrij21-Apr-11 23:13 
GeneralRe: [My vote of 2] Whats the use in practical dev Pin
tejinderjoshi2-May-11 16:48
membertejinderjoshi2-May-11 16:48 
GeneralRe: [My vote of 2] Whats the use in practical dev Pin
Abhijit Jana2-May-11 19:47
mvpAbhijit Jana2-May-11 19:47 
GeneralRe: [My vote of 2] Whats the use in practical dev Pin
Kunal_Chowdhury22-Apr-11 3:59
mvpKunal_Chowdhury22-Apr-11 3:59 
GeneralRe: [My vote of 2] Whats the use in practical dev Pin
tejinderjoshi2-May-11 16:47
membertejinderjoshi2-May-11 16:47 
GeneralRe: [My vote of 2] Whats the use in practical dev Pin
Abhijit Jana2-May-11 20:00
mvpAbhijit Jana2-May-11 20:00 
GeneralMy vote of 5 Pin
Abhimanyu Kumar Vatsa19-Apr-11 4:03
memberAbhimanyu Kumar Vatsa19-Apr-11 4:03 
GeneralMy vote of 5 Pin
HaBiX19-Apr-11 1:11
memberHaBiX19-Apr-11 1:11 
GeneralMy vote of 5 Pin
SChristmas12-Apr-11 2:02
memberSChristmas12-Apr-11 2:02 
GeneralMy vote of 5 Pin
Gandalf - The White11-Apr-11 22:51
memberGandalf - The White11-Apr-11 22:51 
GeneralMy vote of 5 Pin
Abhinav S9-Apr-11 3:56
mvpAbhinav S9-Apr-11 3:56 
GeneralMy vote of 5 Pin
Sunasara Imdadhusen8-Apr-11 20:45
memberSunasara Imdadhusen8-Apr-11 20:45 
GeneralMy vote of 4 Pin
Oscar N.18-Mar-11 8:37
memberOscar N.18-Mar-11 8:37 
GeneralRe: My vote of 4 Pin
HaBiX19-Apr-11 1:11
memberHaBiX19-Apr-11 1:11 
GeneralSimply Superb Pin
Dorababu74316-Mar-11 2:05
memberDorababu74316-Mar-11 2:05 
GeneralMy vote of 5 Pin
SChristmas11-Mar-11 8:41
memberSChristmas11-Mar-11 8:41 
GeneralMy vote of 5 Pin
Brij9-Mar-11 7:13
mvpBrij9-Mar-11 7:13 
GeneralMy vote of 5 Pin
E$w@r9-Mar-11 5:49
memberE$w@r9-Mar-11 5:49 
GeneralMy Vote of 5 Pin
RaviRanjankr9-Mar-11 3:00
memberRaviRanjankr9-Mar-11 3:00 
GeneralMy vote of 5 Pin
Venkatesh Mookkan8-Mar-11 21:10
memberVenkatesh Mookkan8-Mar-11 21:10 
GeneralGood to know Pin
Toniyo Jackson8-Mar-11 20:41
memberToniyo Jackson8-Mar-11 20:41 
GeneralMy vote of 5 Pin
Prerak Patel8-Mar-11 20:03
memberPrerak Patel8-Mar-11 20:03 
GeneralRe: My vote of 5 Pin
Abhijit Jana8-Mar-11 20:18
mvpAbhijit Jana8-Mar-11 20:18 
GeneralMy vote of 5 Pin
Ramalinga Koushik8-Mar-11 20:01
memberRamalinga Koushik8-Mar-11 20:01 
GeneralRe: My vote of 5 Pin
Abhijit Jana8-Mar-11 20:20
mvpAbhijit Jana8-Mar-11 20:20 
GeneralRe: My vote of 5 Pin
Ramalinga Koushik8-Mar-11 20:35
memberRamalinga Koushik8-Mar-11 20:35 
GeneralMy vote Pin
mkgoud8-Mar-11 19:57
membermkgoud8-Mar-11 19:57 
GeneralRe: My vote Pin
Abhijit Jana8-Mar-11 20:20
mvpAbhijit Jana8-Mar-11 20:20 
GeneralMy vote of 5 Pin
Kunal_Chowdhury8-Mar-11 19:30
mvpKunal_Chowdhury8-Mar-11 19:30 
GeneralRe: My vote of 5 Pin
Abhijit Jana8-Mar-11 20:24
mvpAbhijit Jana8-Mar-11 20:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150819.1 | Last Updated 8 Mar 2011
Article Copyright 2011 by Abhijit Jana
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid