Simple program using WCF _example
In the above webpage we can enter the two values and when clicking on the button it will return the result .
We can read the two values by
We can read the two values by
Now we have to add a new wcf project to calculate the sum . we can use the wcf to read data from the databases also .
Implement those method in the svc file . Write the operations that you need to do .
we have to select the url of the service from the address bar , so we have to see the service in a browser , so use that option .
select the URL from the address bar
Now we have to create a service reference in the project from which we are invoking the service . So we have to select the Add service Reference option from the reference . We have to create service reference in the project from which we are invoking the service .
We can use the class name of the client class , which inherits our methods for the object creation. We can take the name of the class from the reference file .
create object for the client class and access the corresponding add method with use of the object .
We can see the output like below
Comments
Post a Comment