IIS Virtual directory/application name in upper case

iis-6url

In IIS I have web site with .Net application, accessible like this:

http://site1.example.com/myapp

The site requires authentication, so when I access it, it redirects as expected to http://site1.example.com/myapp/login.asx

I exported the configuration, and then used the file to create a new site under the same server. Now, when I access the new site at http://site2.example.com/myapp, it redirects to http://site2.example.com/MYAPP/login.aspx. Note the upper case for the app name.

Before I imported the xml configuration file, I edited it to set different root directory for the application (where I placed a copy of the existing one), so this is not the problem.

When I look in MetaBase.xml, the AppRoot for the virtual directory in the newly created site was set to /LM/W3SVC/1584782141/Root/MYAPP, while in the exported xml file, as well as in Metabase.xml but for the original virtual directory its lowercase, as it should be.

I edited the MetaBase.xml (in IIS the online edit of metabase is allowed) and saved it. No change at all. I reloaded the Metabase, the correction is in place, but it just don't work – it always redirects to the capitalized version of the URL.

This happens only when redirecting to login.aspx. If I hit directly the login page – i.e. I type the url in the browser, it stays as I typed it.

Also, if I hit a "not protected" page in the directory, it keeps the case as it should.

Any idea where else I can look to fix that issue?

Best Answer

I have found the exact same issue, with IIS 6. I have found a few references to this issue elsewhere on the web; I don't think too many people do this to have run into the bug. The fix is to allow direct edits to the metabase, and then edit it to change the AppRoot to have the correct case.

Which, you say that you have done. It always works for me; this is how we deploy new customers in our environment. Try recycling the application pool, and make sure you flush the cache and cookies in your browser(s).