简体   繁体   中英

AD Microsoft Login 400 bad request headers too long ASP.net MVC

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM