URL Case Sensitivity and Assembly Loading

URL is case sensitive.

In Windows file names are case insensitive.

When these two meet, you can sense some inconsistence here.

When an http assembly is requested, it has to be copied into download cache, before itĀ is returned to you.

Download cache is indexed by the URL. Now we have to consider the URL case sensitivity issue.

If we treat the URL as case sensitive, it means assembly https://foo/bar.dll will beĀ considered as different from assembly https://foo/BAR.dll. If those two URLs mean different assemblies then we are fine. Unfortunately, if the web server is IIS, those two URLs really mean the same assembly. Weird problems happen when we consider them as different ( typical one is InvalidTypeCast error).

Thus we index the download cache by the URL as case insensitive.

This essentially means, URL for assembly is case sensitive, in the client side.

In .Net framework v1.0/v1.1, when we go probe for assembly foo, we will look for file foo.DLL, with the extension capitalized. If your web server treat URLs are case sensitive (like Apache), you need to be aware of this.

In .Net framework v2.0 beta 1 we changed the probing extension to small letter foo.dll. We realized this is a breaking change, and we change it back to capital letter foo.DLL in beta2.