Running ASP.NET 2.0 on FileSystem instead of IIS without Visual Studio 2005/2008 installed

How are you able to run your ASP.NET 2.0 web application on File System (Standalone web server without IIS) without Visual Studio 2005/2008 installed in your local machine. I will say this is particular useful for POC ASP.NET 2.0 web application to customers or having web graphics designer testing out the ASP.NET 2.0 web application without knowing anything about IIS or trying to run F5 on Visual Studio 2005/2008.

How can you do that? I heard from lots of people that it wasn't possible to do this. There was no way you can extract out this FileSystem from Visual Studio 2005/2008. You can download the existing Cassini 1.0 and enhance it. You can also find some implementation online like this http://blogs.msdn.com/dmitryr/archive/2006/03/09/548131.aspx or download UltiDev Cassini (which I wasn't able to install it properly).

This might not be common but I believe it can be useful to lots of people out there.

Tip #1

You can run this filesystem without having Visual Studio 2005/2008 installed as long you have .NET Framework 2.0 and above installed.

You can locate this file "WebDev.WebServer.EXE" at C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

Try it yourself

Tip #2

Run this application in the Visual Studio 2005/2008 command prompt as below or you can try open a command prompt and change directory to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

webdev.webserver.exe /path:"C:\MyPOC\TestWeb" /port:1337 /vpath:"/TestWeb"

First you define a path of your ASP.NET 2.0 Web Application. I include quotes around the path.

Set any ports you like, but do be careful of complication to existing ports used by other applications. I noticed when you debugged ASP.NET 2.0 FileSystem project in Visual Studio 2005/2008, it would use this port 1337 so I reused it.

I will recommend to set a virtual path like above. It can be anything you like.

Tip #3

webdev.webserver is not dependent to IIS. If you don't believe it, try to stop all your IIS web process.

Tip #4

The ASP.NET Development Server will run at your taskbar like below. But don't even try to click on the Root URL.

You will never able to get it to run. I almost gave up because of this as I thought there was some JIT error.

Instead, run the URL http://localhost:1337/SPAN directly on your web browser (IE or FireFox). It works :)

Hope you find this useful. If you know there is a better way, let me know. Thanks.

Updates:

I realized some machines did not have the webdev file in the right place, instead it was stored in this location C:\Program Files\Common Files\Microsoft Shared\DevServer\9.0

Nevertheless, it works :) Good luck

5 Comments

Comments have been disabled for this content.