My asp.net mvc application works as expected on localhost and logs in on every browser with ease. I am using Azure Active directory to log in to the application, I published my application to a web server and now I get a 400 bad request from every browser.
I have tried clearing the cache with no luck. I increased the maxRequest and time.
<httpRuntime targetFramework="4.6.1" maxRequestLength="2097151" executionTimeout="2097151"/>
I noticed that the browser is attempting to log in but the request is sent over 40 times. I managed to get it working sometimes but once the request is sent to microsoft.login I get the same error.
Does anyone know of a solution to my problem?
Thanks in advance, Adam.
Based on my understanding, the HTTP headers is determined by both maxRequestLength
and MaxFieldLength
, please also increase the value of MaxFieldLength
and let us know whether it helps. (Refer this KB for the same error message)