Block cross domain calls to asp.net .asmx web service

前端 未结 3 830
面向向阳花
面向向阳花 2021-02-02 04:16

I\'ve built an application that uses jQuery and JSON to consume an ASP.NET .asmx web service to perform crud operations. The application and .asmx are on the same domain. I dont

3条回答
  •  遥遥无期
    2021-02-02 04:22

    Quick and dirty solution would be to use IP address restrictions to allow only your domain's IP address access via IIS.

    Probably better would be using HTTP authentication. There are many ways to do this, I found Authentication in ASP.NET Web Services a helpful overview.

提交回复
热议问题