I have an MVC2 site where we run many integration tests. Most importantly, we test the behavior when using bad URLs. For instance:
http: // xxxx / v1 // Dy888 / 1/1234567815 / swlocation? fv = 24 & sv2 = 3 & sv3 = 5
(Note the two slashes after "v1".)
This should give HTTP 400, Bad Request, and in the development environment (VS2008) everything works as planned. But in the test environment, IIS7 or MVC2 somehow sees this and the answers, as if there was only one slash. It seems too smart and helps us by rewriting the request.
How can I configure my server so that it is not “smart” and really respond with the correct error?
The test server is Windows Server 2008 with IIS7.
Thank! - Niklas
source
share