I'm looking to create json objects in the client and then transfer these objects back to the server for processing. These are the following options I'm considering:
a page method
a web service
a custom http handler
I'm looking to use jquery to send the objects. The plan is to convert the json object into c# objects that in turn go into queries. During the processing, I'll need access to the users' session that's working in SQL server session mode. The pages where these calls will be running will be on https. The return objects will also be json objects. I'll consider scalability, security and performance.
I was wondering what would be the ups/downs of using each option.
Thanks for your suggestions.
This is my order of preference:
Web service gives the maximum flexibility and scalability. ASP.Net web services are in fact HttpHandlers conforming to XML/SOAP standards.
Page Methods are least flexible. They best for one off communication between a piece of javascript with the aspx page. Even then, you have better ways to handle that rather than going through a page method.
Here are few benefits of using a web service:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With