February 01, 2006

My server is developing problems

I've been using Visual Studio 2005 for a while now at work and for the most part enjoy it. I really like the Refactor > Rename feature because i'm constantly renaming my classes until i get them just right. I also thought the ASP.NET local development server (aka Cassini) would be a nice way to quickly test out new code on my local machine. However, this thing that was supposed to make my life easier has made me miserable this past week.

First i was playing around with some URL re-writting to make it easier to link to parts of my application with friendly (Rails-like) URLs. Everything worked great on the test box but when i published to our actual development IIS server, it no longer worked. Actually i was a bit surprised that it had worked on my test box, but i thought maybe it was an ASP.NET 2.0 thing so i wasn't complaining. The problem is that URLs without a file name that don't correspond to an actual physical directory never get routed to ASP.NET and are handled by the default IIS 404 processes. In Cassini (and i think what will be IIS 7) everything seems to go though ASP.NET. I just ended up adding a "/go.aspx" to my link URLs to get things to work properly.

Then, i tried playing around with developing a custom single-sign on HttpModule (not unlike this implementation of TypeKey authentication) that we could use with our custom Appian authentication server. When i tried it out on my local machine, i kept running into weird serialization errors with my custom IIdentity object. I was going nuts. I found out that others were having the same problem and that it was Cassini itself that was to blame. Sure enough, i published to IIS and everything was fine.

I've given up on the default local development server and instead use the local IIS option. It's a bit more of a hassle with permissions and all that but at least there should be fewer surprises when i go to publish.

Posted by Matthew at February 1, 2006 11:11 PM
Comments