2

We have two web servers running IIS 8.5 on Windows Server 2012 R2. The two servers are located behind a load balancer.

The web servers are running a ASP.NET MVC application which, among other features, allows users to access PDF files. Those PDF files are located on a third server, a file server, and made available to both web servers through virtual directories. In each virtual directory we have several subdirectiories.

We are currently experiencing massive issues accessing the PDF files. The access keeps working for days and days and then, all of a sudden, something breaks and we get a 500.19 error whenever someone tries to access a pdf file.
This usually happens on just one web server at a time and totally randomly. Whenever the issues occur the only thing that helps is to recycle the application pool. Until then, PDF files are not available.

Another interesting fact is that, whenever the access breaks, it only breaks for certain subdirectories, while others still works. However, it's not always the same subdirectory that stops working, totally random here too.

I had a look at the log, and that's what I get:

2014-03-05 08:03:44 W3SVC2 [SERVER_NAME] [SERVER_IP] GET [PATH_TO_PDF] - 80 - [LOADBALANCER_IP] [USER_AGENT] [COOKIE] - 500 19 6 0 [ORIGINAL_CLIENT_IP]

I also tried activating the failed request tracing, but that does not really provide more information than the IIS log.

Is there any way to find out why the access to the pdf files (which do physically exist, btw. - access from the second web server when the first fails is still possible) randomly breaks?

  • Did you ever get any answers on this? I am having a very similar problem. http://serverfault.com/questions/751946/iis-virtual-directory-permissions-keep-getting-lost – Dave Jan 28 '16 at 14:39
  • Sorry for the late answer, I am on vacation right now and internet connections are scarce. I answered on your own question so that everyone else looking for an answer could find it easily. – Davide De Santis Feb 08 '16 at 05:47

1 Answers1

0

Answer was found thanks to Sam Gould, who contacted me directly via email.

  1. Click on the Configuration Editor at the Server / Machine level
  2. Select on the Dropdown List and expand the System.applicationHost
  3. select the sites setting
  4. Click on the … button under the Collections section
  5. Select the concerned website and make the allowSubDirConfig to False
  6. Perform IIS Reset

Alternatively We can also try running the appcmd command:
C:\Windows\System32\inetsrv> appcmd.exe set config -section:system.applicationHost/sites /[name='My_Website'].virtualDirectoryDefaults.allowSubDirConfig:"False" /commit:apphost