Business and Technology Consulting Organization in Mumbai

Electronic Transformation Globally Technology Solution IT Consultancy Service Provider

WCF (Windows Communication Foundation)

WCF (Windows Communication Foundation) Client can be web / windows. Here we see how a web client can consume the WCF service.
Windows Communication Foundation
Here i share a WCF implementation structure with a web application, the structure are devided into 3 solutions with 6 assemblies, this can be changed as per requirement. As you can see the structure above.
Now finally we consume the WCF service in our web application, remember here we just need to give the refference of "Client proxy"
Service sample
using ProxyService.Module1;
1:using BusinessEntity;
2:namespace WebClient
3:{
4: public partial class Default : System.Web.UI.Page
5: {
6: protected void Page_Load(object sender, EventArgs e)
7: {
8: if (!IsPostBack)
9: {
10: GetRoomInfo(1);
11: }
12: }
13:
14: void GetRoomInfo(int RoomId)
15: {
16: ServiceProxy _proxy = new ServiceProxy();
17: Room obj = _proxy.GetRoom(RoomId);
18: lblMessage.Text = obj.RoomName;
19:
20: obj = null;
21: _proxy = null;
22: }
23: }
24:}
25:
Leave your comment.

Reduce your Dialy IT Cost, Consult with us
Stay healthy in recession

Advertisement
Sponsored by

HR Recruitment & Process Management System
Jewellery production process management software
Share
©2009 ETG Consultancy, All Rights Reserved Privacy Policy | Terms & Conditions
Asp.net, Ado.net, .Net Remoting, .Net Webservice, SQL, XML, XSLT, WCF, WPF, WWF NHibernate, Ajax, Jquery, DHTML