3

I have searched the web for this and couldn't find anything (well one remotely relevant post), so here I am.

We have multiple ASP.NET apps in IIS 6 using Forms Authentication with dedicated path for each app. Since path is case sensitive it must match URL's path section exactly. However, because of an incorrect casing in IIS 6 Metabase for AppRoot (or Starting Point in IIS UI) bowser doesn't send Form cookie to the server whenever URL is previously resolved on the server and sent to client in incorrect case.

Example:
App URL = "https://Test.net/Application1"
Cookie path = /Application1
Metabase AppRoot = /LM/W3SVC/1393818691/ROOT/APPLICATIONPATH1
Resolved URL = "https://Test.net/APPLICATIONPATH1"

Now to the root cause...
We create virtual directories on test server manually in a specific case (matches Path for each application). We then export virtual directory using UI to an XML file, which is then imported to another server (let's say production), at which point IIS decides to uppercase AppRoot element of the metabase.

Can anyone shed some light on this? Is there a setting on IIS I am not aware of? I am trying to avoid manual edit of metabase after the import. Is that a bug?

user276464
  • 31
  • 4
  • I have no answer to add, but I can confirm the behavior exactly as you describe, when creating a new VirDir from file. – mfinni Apr 20 '11 at 16:43
  • Indeed, thoroughly irritating... ended up having to write extra scripts to fix up the broken AppRoots (in our case because, behind a reverse proxy, the path case was important in itself). Also, using iiscnfg.vbs to copy a metabase branch with renaming, the approot isn't renamed, typically breaking it. These tools don't really seem to be stable. – bobince Aug 09 '11 at 21:32

2 Answers2

1

Have you tried setting up your IIS site using the SDC tasks library for MSBuild instead?

CodePlex Site

It's simple to use and allows you to make your deployment fully automated.

Otherwise a quick fix would be to manually edit the Metabase.xml:

WINDOWS\system32\inetsrv\Metabase.xml

I have experienced this problem before and found no way around it when importing the xml.

el_tone
  • 1,182
  • 8
  • 16
0

I found another way of solving it...

In the application properties I removed the application and restarted IIS and added again the application. The restart forces the metabase to be updated in the disk and the removal of the wrong entry. If you dont restart, the metabase will still have the entrance in upper case. After creating the new application, it will be added to the metabase with the correct casing and problem is solved.

Might be more stuff to do, but its more safe then changing the metabase directly!

Nuno Agapito
  • 220
  • 3
  • 12