How to allow internal MVC Web Api from external site outside the network

前端 未结 2 1307
星月不相逢
星月不相逢 2020-11-29 12:56

I have a MVC Web API (hosted in IIS) which is in the wwwroot folder and locally accessible within the network.I can execute api calls like this: http://mylocalapi:133/

2条回答
  •  醉话见心
    2020-11-29 13:25

    Add below code in your WebApiConfig class in in Register method

    config.EnableCors();
    

提交回复
热议问题