Hi. I'm Trying to collect coverage from an ASP.NET application on an IIS site using OpenCover. This requires profiling w3wp.exe using the -debug flag.
I know that this is possible because I was able to collect coverage fine on a test VM I had set up using the Default Web Site and DefaultAppPool. On my integration environment though, the application was configured to use its own AppPool and ApplicationPoolIdentity. I kept getting 403.18 "Cannot execute requested URL in the current application pool" errors when running in debug mode, so used IIS Manager to change the application to use the DefaultAppPool. The DefaultAppPool seemed to still be working because I was able to get to the root IIS splash page when running in debug mode but any pages under my application were throwing 403.18.
The site still runs fine with both the Default Web Site and my application running in the DefaultAppPool as long as the w3wp is started by the W3SVC. When I stop the service though and try to launch the w3wp in debug mode using the command line I get this error:
ERROR: There was an error reading the configuration. Please check that the configuration file is exists, is accessible and contains valid configuration.
Oddly enough, I can't find a single reference to this particular error message anywhere online or in Microsoft's documentation, and there doesn't seem to be much information on the w3wp parameters anywhere other than what's in the command line.
Could anyone give me a little guidance in where I should be looking for a solution to this configuration issue? I've seen some similar error messages from IIS online and those seem to be indicative of issues with permissions and the application's Web.config. But it also seems like it could be an issue with the ApplicationHost.config or one of the AppPool configs since that's the only thing that I changed before getting this error.