I have a (VB) web site application that calls an ASMX service via an AJAX control (using AjaxControlToolkit) to pre-fill a name search. However, that call always returns an internal server error 500.19 with the error "There is a problem with the resource you are looking for, and it cannot be displayed." All other functionality of the application works. The web site is precompiled and deployed on a two-node Windows 2012 R2/IIS 8.5 cluster. I've tried adding various items to my web.config per other threads, I've deleted the application and recreated it, I've verified database connectivity, I've checked that ASMX handlers exist in the IIS config. Even more befuddling is that this application works in my local Windows 8.1/IIS 8.5 environment and on an IIS 7 test server.
The application runs under an application pool configured for .NET 4.0 and using a pipeline mode of "Integrated." For the sake of testing, I've tried using a 2.0 pool, but then the application doesn't work at all.
The format of the request URL I get an error for is: http://www.example.com/myapplication/EmployeeSearch.asmx/SearchByName
Any ideas what else to look at? Would there be something about the cluster environment causing this issue?
(I know 87,000 people have asked a similar question, but I have yet to find one that solves my issue.)
Update After stepping away for a bit, I came back to this. I was finally able to get more in-depth error information (500.19), though it's still not elucidating enough. Calling the ASMX is the only part of the app that produces this error. I also did a quick version that just uses jQuery to call the service, and it produced the same result. Per below, the config file path is befuddling to me...why would that be the path it uses?
Module: IIS Web Core Notification: BeginRequest Handler: Not yet determined Error Code: 0x8007010b Config Error: Cannot read configuration file Config File: \\?\UNC\0.0.0.0\webcontent\www.example.com-iis\my-application\EmployeeSearch.asmx\SearchByName\web.config Requested URL: http://www.example.com:80/my-application/EmployeeSearch.asmx/SearchByName Physical Path \\0.0.0.0\webcontent\www.example.com-iis\my-application\EmployeeSearch.asmx\SearchByName Logon Method Not yet determined Logon User Not yet determined Request Tracing Directory C:\inetpub\logs\FailedReqLogFiles
The solution, in this case, (after speaking to Microsoft Support) was to set
allowSubDirConfig for the application to
Now to back up and explain why. This is because of how IIS probes - if set to
True or not set at all - for the web.config. It is smart enough to check if a given path/URL (in this case, an ASMX call) is a directory before attempting to retrieve a
web.config, but depending on the storage for the application, it may not be able to tell if it is a directory, in which case it defaults to looking for a
web.config as if that path is a directory. In my case, we are using a remote NTFS share for storage. Likely the appliance/device or the device driver doesn't support the operation/directory watcher IIS uses to check for the existence of the directory. Setting
False means IIS won't attempt to probe for a
web.config file when an ASMX method call is made, which prevents the "Cannot read configuration file" error I was getting.
User contributions licensed under CC BY-SA 3.0