XMLHttpRequest cannot load file. Cross origin requests are only supported for HTTP

后端 未结 7 956
太阳男子
太阳男子 2020-11-22 07:08

I am getting the following error:

XMLHttpRequest cannot load file:///C:/Users/richa.agiwal/Desktop/get/rm_Library/templates/template_viewSettings.html. Cross         


        
7条回答
  •  轮回少年
    2020-11-22 07:40

    I was facing this error while I deployed my Web API project locally and I was calling API project only with this URL given below:

    localhost//myAPIProject

    Since the error message says it is not http:// then I changed the URL and put a prefix http as given below and the error was gone.

    http://localhost//myAPIProject

提交回复
热议问题