Today I am going to discuss another great feature of WCF. Do you know that a WCF service allows us to create a JavaScript Proxy? Yes it does!! But let's first understand what is a proxy? As we already know, whenever we have to use any web service or WCF service, we need to create proxy of that service and with the help of proxy, we use the functionalists provided by the web/WCF service. Proxy acts an intermediary between the client of the service and the actual service. Proxy provides a simple interface to the consumer of service and all the intricacies like creating a connection, creating and sending the request, getting the response, etc. is handled by the proxy itself. So in our applications, we add service reference using the wizard to add the proxy of the service. We sometimes also use command line tool to create the proxy of the service. And then, use that proxy to create the instance of the service client and use the methods of the web service. Similarly JavaScript proxy enables the Client to connect the WCF service from the JavaScript or other client side libraries without writing any server side code. So in this post, we'll create a WCF Service, will update the required configuration and then, we'll use that web service with the help JavaScript proxy from application. We can use the JavaScript proxy to connect from the ASP.NET web forms and ASP.NET MVC applications both.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tutorials,WCF,javascript,WCF Service using JavaScript