3

Hopefully somebody can point me in the direction of a solution for this particular problem.

The Scenario (Sitecore 7.2 rev 140526)

I have a static 'index.html' file hosted in a folder (let us call it 'test') inside my Sitecore web application.

If I access the index.html file directly via a web browser, everything loads correctly.

However, if I access the directory (i.e. http://myweb.site/test/) I receive a 500 error.

The error message is binding to the default document correctly, as evidenced by the details in the error message.

UPDATE: I have been able to reproduce with a fresh 7.2 instance with the NTTData CDN Connector configuration file in place.

What I have tried already

  1. To prevent Sitecore from serving it's 404, I updated IgnoreUrlPrefixes setting
  2. The index.html file name is in the list of default documents for the site (and folder)
  3. In order to bypass the ExtensionlessUrl handler for .NET and resolve a 404 error, I have re-ordered the Handler Mappings to place the StaticFile handler before the ExtensionlessUrlHandler handlers.
  4. Running on the same IIS instance, I setup a separate site with the same files and the default document loading worked correctly.
  5. I have verified that the folder in IIS has Anonymous Authentication enabled
  6. I have tried providing the Everyone group with full control to the folder in NTFS permissions
  7. I have validated that the folder and folder parents are not marked as 'Hidden'.
  8. IIS Failed request tracing did not provide much, but I did notice the Sitecore Rewrite module changing the URL a few times in the handler pipelines to append a "?". Subsequent calls by the static module did not show any warnings or errors though.
  9. I have reproduced with a blank Sitecore 7.2 instance by adding the NTTData CDN Connector configuration file

The error I am seeing

HTTP Error 500.0 - Internal Server Error
Module: DefaultDocumentModule
Notification: ExecuteRequestHandler
Handler: StaticFile
Error Code: 0x800703e9
Requested URL: http://myweb.site/test/index.html
Physical Path: C:\MyWebsite\test\index.html
Logon Method: Anonymous
Logon User: Anonymous

Any thoughts?

Jay S
  • 7,904
  • 2
  • 39
  • 52
  • you say you have a another site running on the same IIS instance that works, could you try adding another IIS instance pointed to that same folder and see if that works? Maybe it is an instance setting, or corruption? – jammykam Dec 23 '14 at 20:59
  • Nice idea @jammykam, I did try this. Did not work. I've updated my post with some additional diagnostic details. A fresh 7.2 instance with the IIS configuration changes and the NTTData CDN configuration file seems to cause the issue. Still digging into why... – Jay S Dec 24 '14 at 13:41
  • Hey Jay, I know you said you added the item to the IgnoreUrlPrefixes path, but did you add "/test" or the index.html file directly? I currently have a microsite setup in the exact same way, where there is a folder, "A", that includes many files including an index.html. When I browse to http://mysite/A, I am redirected to the index.html file. – Nona Drake Mar 13 '15 at 19:44
  • Hi Nona, I had added the folder, not the file. I wanted IIS to serve up the default document (which it was not doing) – Jay S Mar 13 '15 at 20:11

3 Answers3

1

While I have not figured out why the CDN connector interferes with the loading of the static files, I have been able to resolve the issue using an approach from this answer.

Essentially, by running the subfolder as an application with a classic mode application pool and putting the static file handler mapping first, the CDN connector doesn't execute and everything works great.

Community
  • 1
  • 1
Jay S
  • 7,904
  • 2
  • 39
  • 52
1

I think I found the cause of this.

There is a processor that is patched just before the FilterUrlExtensions processor called CDNInterceptPipeline which attempts to convert the following via a url rewrite:

/path/to/file.ext!cf!a=1!b=2 to /path/to/file.ext?a=1&b=2.

This caused all number of problems in our solution, including the one you stated above, and for the CDN set up we're using we didn't even need it. It might be that you can safely remove it from the SitecoreCDN.config as we did.

Source: https://github.com/NTTDATA/SitecoreCDN/blob/master/Code/Pipelines/CDNInterceptPipeline.cs

1

I accidentally had a web.config in the folder. Deleted that. Everything worked.

JohnWrensby
  • 2,652
  • 1
  • 18
  • 18