I upgraded an old solution to Visual Studio 2015, and ran into trouble with one of the .asmx web services. I have a number of them in this solution, and IIS express loads and runs them all correctly, except one. This one service always returns a 404 if I try to load the .asmx URL in IIS express. It runs correctly in full-blown IIS.
None of the problems I've found online solve my situation. Here are the details:
- The web.config files of the working and non-working web services are identical.
- The IIS express/.csproj configuration is identical, except for the port and project names, and a few different assembly references.
- The projects are virtually identical as well, with only a single .asmx service file with a code behind .asmx.cs and .asmx.resx files.
- The C:\Users[my username]\IIS Express\config\applicationhost.config doesn't list any of the working or non-working services, so that can't be the difference.
- Examining the complete trace from C:\Users[my username]\IIS Express\TraceLogFiles[service]\fr000040.xml for a request on working and non-working services, they are virtually identical right up to step 109, AspNetMapHandlerEnter. The working service goes right to AspNetMapHandlerLeave at step 110, where the non-working service sets a few cache headers and then at step 112 sets the status code to 404 with a "warning" label on it.
I'm not sure what's going on here or what I can do next, so any suggestions would be much appreciated.
I solved it by basically creating a new project and importing all the old files. IIS express must have cached something somewhere when the project was invalid, and by recreating the assembly information it forced a refresh.