Problem Statement: A service that can be accessed by both client-side (jquery) and server-side (asp.net) applications. All the applications are internal apps. Note: Preferrable format of communication is JSON
Description:
I need to expose a persistent store (database) through a service which provides CRUD operations. The service needs to be accessible from both client-side applications via jquery and server-side applications such as asp.net webapplications.
From my initial research, I realized that if I go with asp.net ajax asmx (or) ajax enabled wcf service, I will not be able to use this in other applications due to cross-domain / cross-scripting issues (ref: calling asmx web service from jQuery).
I saw workarounds using JSONP but my understanding is that only get requests are supported and its a hacky either way.
I think I'm all over the place. Here are some of the links I went through :
http://forums.asp.net/p/1512786/3609834.aspx
How to call external webservice using jquery "jsonp"?
can jquery ajax call external webservice?
What is the best way to call a .net webservice using jquery?
What are some good examples of JQuery using JSONP talking to .net?
http://msdn.microsoft.com/en-us/library/cc716898.aspx
http://www.west-wind.com/Weblog/posts/107136.aspx
http://abcoder.com/javascript/jquery/jsonp-first-timer/
https://web.archive.org/web/20211016203116/http://www.4guysfromrolla.com/articles/111710-1.aspx
I'm going towards a self-hosted WCF Restful service that deals with JSON. Is this a viable options ? Any issues with Restful WCF Service ? Any suggestions ?
Note: I'm using C# and .NET 3.5 SP1
Please advise.