page method vs web service
Since a page method can only be called from the browser page that's talking to the aspx page that created the client, is it a correct assumption that a page method is more secure than a web service that's live on the internet for anyone to connect to?开发者_如何学Go
Thanks.
That depends. A page method is usually private or protected, and trigger by general page life cycle, or user clicks. It's not very likely that page methods are defined as public API.
But you can definitely define page methods as [WebMethod] and allow for client side call, in this sense, page methods are not so different with web service methods. Although not so many people do it in this way.
精彩评论