Translate

Wednesday, 27 April 2016

Access WCF service using Jquery Ajax and C#.Net

How to access WCF service Using Jquery ajax and C#.net

For Reference
https://debugmode.net/2011/12/22/how-to-enable-rest-and-soap-both-on-the-same-wcf-service/





<script>
    $(document).ready(function () {
        var URL = "http://sample/service.svc/Check_Session";
        $.ajax({
            type: 'GET',
            url: URL,
            dataType: 'json',
            crossDomain: true,
            success: function (data) {
                if (data.Message != "Success") {
                    alert("success");
                }
                else {
                  
                    alert("Fail");
                }
            },
            error: function (ex) {
                console.log("err");
            }
        });
    });

</script>

Thursday, 21 April 2016

Add proxy class for wcf service through Visual studio Command promt



Open VS command Prompt and  give path of svcutil
 and add service


see the below url for ur reference
http://www.codeproject.com/Articles/786601/Ways-to-generate-proxy-for-WCF-Service