NETWORK_ERROR: XMLHttpRequest Exception 101

后端 未结 7 2053
南旧
南旧 2020-11-30 07:45

I am getting this Error

NETWORK_ERROR: XMLHttpRequest Exception 101

when trying to get XML content from one site.

Here

7条回答
  •  萌比男神i
    2020-11-30 07:53

    Another modern method of solving this problem is Cross Origin Ressource Sharing. HTML5 offers this feature. You can "wrap" your XMLhttp request in this CORS_request and if the target browser supports this feature, you can use it and wont have no problems.

    EDIT: Additionaly i have to add that there are many reasons which can cause this Issue. Not only a Cross Domain Restriction but also simply wrong Settings in your WEB.CONFIG of your Webservice.

    Example IIS(.NET):

    To enable HTTP access from external sources ( in my case a compiled Phonegap app with CORS request ) you have to add this to your WEB.CONFIG

        
            
                
                
            
        
    

    Another scenario:

    I got two webservices running... One on Port 80 and one on Port 90. This also gave me an XML HTTP Request Error. I even dont know why :). Nevertheless i think this can help many not well experienced readers.

提交回复
热议问题