I've been interested lately in hosting the ASP.NET runtime. I'll have more to say about it later, but I've got a bunch of experiments I need to run first. One of them I just ran now, and the results were rather disappointing.
The easiest way to host the ASP.NET runtime is to use the Visual Studio 2005 web host executable, webdev.webserver.exe. This is the EXE that launches when you hit F5 on a web project in VS2005. You can also run it by hand by doing something like this:
webdev.webserver /port:8080 /path:C:\temp\mywebapp /vpath:/mywebapp
For the most part, it works well, and I've used it successfully on one production project already. One thing it doesn't do, though, is to deal correctly with the "extra" bits after the end of extended URLs. For example, in FlexWiki, we have URLs like this:
The reason the URLs look like this is a long and complicated story. But the deal here is that the page that gets executed is default.aspx, and anything that comes after that indicates the particular wiki topic that should be rendered. You can retrieve this extra part via ASP.NET's Request.PathInfo. Unfortunately, webdev.webserver.exe does not deal correctly with paths of this form. It appears to want there to be a file at "C:\whatever\base\directory\default.aspx\FlexWiki\HomePage.html" that actually exists on disk. D'oh!
Fortunately, I think I can fix this. But first I need to run some more experiments. :)
Alternatively you could try my WebDev.WebServer2 implementation. It looks similar to the builtin webserver, but uses HTTP.SYS and is not limited to local requests by definition. Additionally, path info should be working as expected.
ReplyDeleteFor more information, see http://www.wilcob.com/Wilco/Toolbox/WebDevWebServer2.aspx.
Great - I'm glad to see that you've taken this on. I'm going to move comments on your implementation over to your blog where they belong. I have a few suggestions and issues.
ReplyDeleteInteresting. We use url rewriting and it seem to work in webdev.webserver.
ReplyDeleteMy complain is this vpath stuff when in dev mode. load of rubbish makes dev to live a pain when working with rel paths. So I run webdev.webserver manually to get around this.
Dear Sir/Ma'am
ReplyDeleteI have installed server 2000 on my system. IIS is also installed but web server is not running on my system. Kindky tell me how to runn the web server
With Regds
Neeraj Dalal
When i try to execute a project in visual studio
ReplyDeleteit showing webdev.webserver error.
can anyone tell me how to rectify that?
there may be several reason:-
ReplyDelete1.your project is running on any port that is not available or some other project is using it.
2. there may be infinite loop in your program.
3. or some dll is missing in your project.