A journey to .Net

From IIS 6 to IIS 7.5 : not as easy as it looks

Sunday, 27 June 2010 15:23 by mBerube
(Also available in: français)

I wanted to do some changes to my blog engine yesterday. I took my production code which run perfectly at my hoster on IIS 6 and I put it on my dev server on IIS 7.5. Nothing worked ! Error 401 (authentication) on every pages, even with Accept Anonymous request enabled. After many tries and searches, here's what I did to make it work, hopping it could be usefull for some of you :

  • 1st, I've created the application and put it in the Classic .Net AppPool
  • I verified that the default document was default.aspx. It wasn't so I put it on the top of the list.
  • Then, I checked if the user of the appPool had the required rights on the files. It's a little bit harder to check with IIS 7 because every appPool has a custom user. The only thing to check is that the IIS_IUSRS group has the required rights on the folder and it was ok.
  • It still doesn't work. I then saw on a blog post that even if you gave Anonymous user access to the site, you still need to setup which user to use as ananymous. My error was there and as soon as I put the anonymous user credential to "Application Pool Identity", boom, everything worked perfectly.

There's one last problem with an easy workaround but I still not understand. When i use the url http://myservername/blog (with a lower case b), it doesn't work BUT with the url http://myserbername/Blog (with an upper case B), it works? The application name is "Blog" but I didn't think that IIS treat URL as case sensitive. I will continue to look for that and I will keep you in touch.

Thanks, happy developping.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   BlogEngine.NET
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRss comment feed