1

So I have 3 Servers. We will call them A, B and C

A and B host a website and are load-balanced. C is a file server and does nothing but serve up files of various types, but for this we will use images. C is not running IIS.

When I test on server B, images are served as expected.

When I test on server A, pages load slowly, and I get the following error message:

GET http://domainC/folder/imageA.png 500 (Internal Server Error)

If I go to "domainC/folder/imageA.png" the webpage shows me a "friendly" error that says:

500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed.

I have looked in the event viewer on both A and C. I see no errors on either machine.

To complicate things, I can go to "domainC/folder/imageB.png" and it will display the image as expected.

I have compared the application pools and settings for the sites on both A and B, and as far as I can find everything is identical.

I did see this on A earlier:

Failed to start monitoring changes to '\C\folder'.

at System.Web.FileChangesMonitor.FindDirectoryMonitor(String dir, Boolean addIfNotFound, Boolean throwOnError) at System.Web.FileChangesMonitor.StartMonitoringFile(String alias, FileChangeEventHandler callback)

at System.Web.Configuration.WebConfigurationHost.StartMonitoringStreamForChanges(String streamName, StreamChangeCallback callback)

at System.Configuration.BaseConfigurationRecord.MonitorStream(String configKey, String configSource, String streamname)

at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()

Also, in my hosts file on my machine, I have the following line:

xx.xx.xx.xx A.com C.com

Since A has the virtual directory pointing to the physical location on C, this should result in successful pulls, and it does on some of the images. It works correctly when I do the same with B.

At this point I'm at a complete loss as to what could be going on.

Bardicer
  • 1,405
  • 4
  • 26
  • 43
  • 1
    You need to temporarily [configure IIS to display error details](https://blogs.msdn.microsoft.com/rakkimk/2007/05/25/iis7-how-to-enable-the-detailed-error-messages-for-the-website-while-browsed-from-for-the-client-browsers/) so you can see the details behind the 500 Internal Server Error. You also might spot some errors in the Windows event log. – Jasen Jul 01 '16 at 18:38
  • 1
    Maybe some access problem. how about adding `` in *web.config* – Andrey Borisko Jul 01 '16 at 18:40
  • On server A, is already set, and C doesn't have a web.config :/ – Bardicer Jul 01 '16 at 18:42
  • Maybe [this](http://stackoverflow.com/a/5385884/1386003) will help – Andrey Borisko Jul 01 '16 at 18:44
  • Sounds like you have to manually inspect ACLs for both files and check if the one that doesn't load hasn't something blocked unintentionally. This happens if you copy a file directly from another server. – Wiktor Zychla Jul 01 '16 at 18:46
  • I've already done that. The virtual directories on A and B have identical ACLs, and use the same identity to access C's files. – Bardicer Jul 01 '16 at 18:51
  • How big are the files? Maybe you're hitting a size limit. – Tim Copenhaver Jul 01 '16 at 18:58
  • up to 5 Megs I'd guess. But a size limit should be imposed on all requests.. all images work when being pulled up by the site on server B. – Bardicer Jul 01 '16 at 19:07
  • Virtual directories can have same ACLs but can still contain individual files that don't inherit ACLs. Check both files rather than directories. – Wiktor Zychla Jul 01 '16 at 19:18
  • 1
    @WiktorZychla I think what he's saying is all the files hes trying to serve are in one directory and server A can pull them fine but not server B – FrostyFire Jul 01 '16 at 19:20
  • @JABFreeware that's exactly what I'm saying. The files are in one place. One server can fetch them, the other cannot. – Bardicer Jul 01 '16 at 19:37

1 Answers1

0

After doing a very thorough diff between the folders on server A and server B, A web.config file was found in the image folder on A. Not sure how it got there because it's not there in the solution, but deleting that seems to have done the trick.

Bardicer
  • 1,405
  • 4
  • 26
  • 43