Feed Icon  


  • Bryant Likes
  • Send mail to the author(s) E-mail
  • twitter
  • View Bryant Likes's profile on LinkedIn
  • del.icio.us
Get Microsoft Silverlight
by clicking "Install Microsoft Silverlight" you accept the
Silverlight license agreement

Hosting By

Hot Topics


Open Source Projects



Adventures with Cassini, HTTP.SYS, XPSP2

Posted in at Tuesday, April 13, 2004 6:07 AM Pacific Daylight Time

Ok so recently I decided to switch my main development platform from Windows Server 2003 to Windows XP. This move was mainly inspired by the fact that I won't need to have IIS 6.0 to do web development in Whidbey based on what I saw at the PDC. So I decided to try to make the move a little early by setting up an XP machine and using Cassini as my dev server. I thought I would blog about my experience so far.

1) Setting up Cassini with VS.Net 2003.

This is where I hit my first snag. I setup Windows XP without IIS since I was planning on using Cassini. Next I install VS.Net and Cassini. I fire up Cassini and try to create a new web project. No luck. VS doesn't seem to work. Based on information I found in this post I was able to determine that I need to create a new project in an existing folder. Still no dice. Finally I figured out that I needed to install the web components in VS. So I had to install IIS, then add the VS web components, and then I uninstalled IIS. Finally, I can connect.

2) NTLM Authentication

Next snag was NTLM Authentication. Most of the web development I do now involves creating intranet sites, and guess what, Cassini doesn't do NTLM authentication. In my searches to see if anyone had extended Cassini to handle this I ran across CassiniEx which is a very cool project to extend Cassini that is run by Michael Carter (version .94 was released 4/2). As I looked into extending Cassini (or maybe CassiniEx) I remembered Don's post about using HTTP.SYS to handle ASPX processing. So I decided I should look into that before doing any work on Cassini.

3) HTTP.SYS and HttpListener

So Don's post on HTTP.SYS con ASP.Net sans IIS (note: his permalinks seem to be having some issues, the post is under march 2004) got me thinking. Maybe I could use HTTP.SYS to do my web development. So my first stop was the Web Transport's WebLog which had blogged about Don's post. I posted my question to them via the contact form asking if HTTP.SYS would handle the NTLM authentication or if that was an IIS specific feature. I quickly got a reply back that HTTP.SYS would handle this for me. Cool. So next it was back to Don's code so that I could try this out and if it worked maybe I would even install XPSP2 so that I could get HTTP.SYS.

Now Don's post says that he got it to “work against the Everett (.NET V1.1)”. So I assumed that I could take his code and do the same. My first clue that this was probrably not the case was the second line of code:

using System.Collections.Generic;

At this point I'm just hoping that he left that in there by accident when he posted the code. But then I come across the HttpListener class. I'm not familiar with this class so I google it and the only reference seems to be Don's post. I also googled the HttpListenerContext class listed in the code and the only result was Don's post.


So at this point I decided I've spent enough time on this for now and I just installed IIS. :)

Hopefully I will be able to figure out how to get the HttpListener class which, based on another of Don's posts, seems to be part of the Whidbey version of System.Net. So even though there will be HTTP.SYS in XPSP2, it will still need some kind of wrapper (so it seems) before it can be implemented in this way. I will probably end up playing with this some more in the future and hopefully I will get some better answers.

Tuesday, April 13, 2004 6:47:00 AM (Pacific Daylight Time, UTC-07:00)
<br>I've pretty much consider it a given that anything Don Box talks about is based on "future bits".
<br>Unfortunately all the Whidbey/Longhorn talk doesn't help me get work done today.
<br>CassiniEx will allow you to host multiple web sites (with different hostheader/port bindings) similar to IIS. In fact the new Management Console I'm finishing up looks suspiciously like the IIS 6 MMC.
<br>However, since NTLM authentication wasn't a big priority for me (most of my web apps use Forms Authentication) I haven't implemented it yet. I did come across some other implementations of NTLM authentications, so I'll have to see how easy it will be to integrate it.
<br>Anyway, thanks for taking the time to evaluate CassiniEx. At least for me, it meets my needs, which is the ability to develop multiple web sites on Windows XP.
Tuesday, April 13, 2004 10:06:00 PM (Pacific Daylight Time, UTC-07:00)
BTW: Sorry for misspelling your name.
Wednesday, April 14, 2004 2:28:00 AM (Pacific Daylight Time, UTC-07:00)
No problem. Lots of people call me Bryan :)
<br>CassiniEx looks great. Have you thought about putting it up on GotDotNet? The Web Protocol guys liked your project. I should probably post some of the results of conversation I had with them.
Wednesday, April 14, 2004 2:40:00 AM (Pacific Daylight Time, UTC-07:00)
Bryant, once I get it to a "feature complete" stage, then I'll probably put it on a more public server.
<br>I like to hear what other people are saying. I've gotten a lot of favorable comments about CassiniEx.
<br>I think this will at least hold us over until Whidbey is officially released.
Tuesday, April 27, 2004 10:17:00 PM (Pacific Daylight Time, UTC-07:00)
Bryant, just wanted to drop a note to let you know that another developer sent me a patch to add NT Authentication to CassiniEx.
<br>I'm making some other changes and hope to get that out in the next day or two.
<br>Hope this will make CassiniEx even more compelling for you to use.
Comments are closed.