- Run ASP.NET with command prompt: http://www.dotnetperls.com/development-server-bat
- Run ASP.NET with command prompt: http://www.codeproject.com/Articles/166319/Run-ASP-NET-Web-Application-from-Command-Prompt
Installing and Configuring WebDAV on IIS 7: http://www.iis.net/learn/install/installing-publishing-technologies/installing-and-configuring-webdav-on-iis#001
Actually to run the asp.net web application you do not need Visual Studio to be installed on your computer. You just have to make sure IIS 7.0 is installed properly with all the required features, firewall is not blocking and have proper permission to access the application.
- Install IIS 7.0 and webdav server
- Using Turn windows features on or off - Install IIS feature
- Copy the Website folder to C:\inetpub\wwwroot\
- IIS Convert to application
- IIS Application pool settings
- IIS Authentication to website
- Firewall configuration
- Website folder permission
Method 1:
The ASP.NET Development Server tests sites locally. We can start it from a .bat file. Many other guides are slightly confusing or incomplete. We see screenshots and a list of steps to take. We manage the development server with ease.
Get started
Here we are starting with a Web Site project in Visual Studio 2008. Its location is the File System, and its language is Visual C#. When you are in Visual Studio and click the green arrow, the site should run correctly.
Create new .bat file. On your Windows desktop, right-click and select New > Text Document. Rename the file so that its complete filename is "example.bat". This is a small program that we will use to start the ASP.NET Development Server.
Add code to .bat file. In the .bat file, you need to add two lines. The first line tells Visual Studio's environment to start up in the background. This line must contain the path to "vcvarsall.bat", which is in your Program Files directory.
Also:The second line invokes the WebDev.WebServer.exe application, and you can pass it the path to your web site's folder. In the following example, replace PATHSITE with the path to your web site folder.
Code for .bat file:
call "C:\Program Files\Microsoft Visual Studio 9.0\vc\vcvarsall.bat"
"C:\Program Files\Common Files\Microsoft Shared\DevServer\9.0\WebDev.WebServer.exe"
/port:3900 /path:"PATHSITE"
The PATHSITE string is the path to your web site's folder, which contains your Default.aspx file, your App_Code folder, your App_Data folder, your Web.config, and other files. There is no actual EXE in this folder. My path is "C:\Users\Sam\Documents\Visual Studio 2008\WebSites\ExampleSite9".
Double-click on the .bat file. Here we need to run the .bat file by clicking on it. After you do so, you will first see a command prompt window, which you can ignore. In the bottom corner of your screen, you will see the System Tray and a balloon pop up.
Right click on the little page icon with the tiny gear and select Open in Web Browser. Your default web browser will open up and the Default.aspx page in your site will be executed.
Method 2:
Run ASP.NET Web Application from Command Prompt
By 8 Mar 2011
,
|
Prize winner in Competition "Best ASP.NET article of March 2011"
No comments:
Post a Comment