After hours of troubleshooting, I tried to debug the visual studio using another instance and go into the internal exception space. As a result, I found the actual cause of the error:
This happens when the path containing the question mark is set as the base path for deploying the web server, i.e. in
- web project property pages (Shift + F4)
- Launch Options Tab
- "Server" section, value "Use custom server" with "Base URL"
An example of an invalid path is http://localhost/v8.0/xyz?user=User1 . The reason is because the build process adds an extra slash at the end. Unfortunately, VS is pretty stable in using the old parameter value, so it needs to be rebooted before rebuilding .
source share