• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 357
  • Last Modified:

IIS 6.0 Handle dots / periods in URL other than prior to extension?

IIS 6.0, not using URLScan. URLs that point to documents that contain dots / periods in their filename fail to load. The same document minus the extra dots / periods, except for the one before the extension, work fine.

I've searched everywhere and not found a solution. URLScan has an option to toggle this, but IIS 6.0 doesn't need it. Plus, I've heard even installing URLScan over IIS 6.0 and enabling dots does NOT help.

IIS is setup to allow Parent Paths.

I've searched the registry and metabase for an appropriate setting to flip. No luck.
0
mcouillard
Asked:
mcouillard
  • 3
  • 2
2 Solutions
 
mcouillardAuthor Commented:
Example of a URL that comes up "not found" despite the exact file existing:
http://www.site.com/files/filename_11.07.2008.xls

Example of a URL that works fine:
http://www.site.com/files/filename_11_07_2008.xls

I suspect this is related to IIS 6s new method of handling MimeTypes. XLS is a supported MimeType, but the extra dots seem to make IIS think the file isn't an XLS.
0
 
meverestCommented:
Hello,

I don't think that it is IIS doing this since I cannot repeat the problem on my own IIS 6 platform.

What is the error message received when you try to access those scripts?

Cheers.
0
 
mcouillardAuthor Commented:
Good thought, meverest! Unfortunately I removed the only possibly offending line in my ISAPI REWRITE configuration and it failed to make a difference.

The exact error in Firefox is "Page Load Error" followed by "File not found". IE attempts to load the file but it's always 187 bytes and ends up being an error message.

Here's another, more real-life example of the URL that fails with extra dots:
https://www.site.com/docs/WEB/ABC/USERNAME_ABC_200810281522_XYA%20DIST%200%20FL%20price%C2%AD_10.28.08.xls

(Yes, I've tried both with and without SSL - same result)
0
 
meverestCommented:
Hi,

are you sure that it isn't the whitespaces causing the problem?  What does the web site log reckon the missing file is?

Cheers.
0
 
mcouillardAuthor Commented:
Turns out it was faulty character encoding. An ASP function fixed the URL enough to make it workable in a browser.

Function URLFileNameFix2(str)
        URLHolder =(Server.URLEncode(TRIM(str)))
      URLHolder = Replace(URLHolder,"%2F", "/")
      URLHolder = Replace(UrlHolder,"+", "%20")
      URlHolder = Replace(URLHolder,"%2E",".")
      URLHolder = Replace(UrlHolder,"%5C","\")
      URLHolder = Replace(URLHolder,"%5F","_")
      URLHolder = Replace(URLHolder,"%5B","[")
      URLHolder = Replace(URLHolder,"%5D","]")
      URLHolder = Replace(URLHolder,"%3F","?")
      URLHolder = Replace(URLHolder,"%3D","=")
      URLHolder = Replace(URLHolder,"%2D","-")
      URLHolder = Replace(URLHolder,"%20"," ")
      URLFileNameFix2 = URLHolder
end Function
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now