简体   繁体   中英

SCRIPT7002: XMLHttpRequest: Network error 0x80070005, Access denied after successful preflight request

I have an issue with IE11 and I guess CORS. I have a ReactJS front-end and Spring backend running on different domains. This far everything has run smoothly also with IE11 and Edge etc.

Now I am getting an error for one API call into my backend, when I am fetching users from my backend, I have to make a separate call into a different server to get some authentication data for the users. If I try to fetch more than 20 users data, IE11 gives me this Access denied error: SCRIPT7002: XMLHttpRequest: Network error 0x80070005, Access denied. In the network tab the preflight request is 200 OK though. I have no idea why it is giving this error. All the other network requests are working fine, but this one call with 50 users gives this error. So it actually works if I use the same exact endpoint and everything same except only 20 users. I am using fetch API for all network requests.

PS. In other browsers (also Edge) everything works as expected even with 50 users.

Found an answer myself by studying the http request I am trying to send. It exceeded the character limit of an url in IE, so that's why I got the error.

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