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.