Can anyone access my WebMethods outside the page?

I have a page and I have web methods that I can use on an aspx page through ScriptManager. I am wondering if anyone can access these methods from outside the page, if so, how can I protect WebMethods?

0
source share
4 answers

Protecting web methods is completely impossible. After all, if you access them from your web page, they are accessed directly from the client browser.

You can add an additional parameter, which should contain some one-time password / token and generate it when rendering the page. This will make it difficult for someone to continue using your web service without actually visiting your site.

+3
source

- ​​ , -. , , , .., . - cookie, , , , . , .., , . - , , , - .

, , - (.. ). , .

, -, ASPX. - -. , "" . -, , .

+4

Yes, adding the WebMethod attribute makes this method remotely callable, which means you can call it, for example, using javascript. Simply put, you should not expose WebMethods that you do not want third parties to call. But for more information about security and web services, see: http://msdn.microsoft.com/en-us/magazine/cc188947.aspx

+1
source

Yes.

But you can easily protect them .

+1
source

Source: https://habr.com/ru/post/1536317/


All Articles