WCF Tutorial, Part 3: Create Data Access Library

01. December 2013 WCF 0
Code First Model with ADO.NET Entity Framework is used. In this way the database can be defined during the runtime. This will use our Entity Class RoomReservation which has already defined. Add a new Class Library project to the solution and name it RoomReservationData. Add reference to RoomReservationContracts and EntityFramework Assemblies. EntityFramework needed to be ...

WCF Tutorial, Part 2: Create a Simple Service and Client

01. December 2013 WCF 0
The following steps will be creating a simple service which is used to reserve a room. Task 1: Define Service and Data Contract Create the DataContract Open Visual Studio Create an Empty Solution called RoomReservation Add a Class Library project to the solution and name it RoomReservationContracts Create a class called RoomReservation This class will ...

WCF Tutorial, Part 1: Introduction

01. December 2013 WCF 0
Overview Prior to WCF, different communication technologies such as ASP.NET Web Services, .NET Remoting, and ASP.NET’s Web Service Enhancements (reliability, platform independent security, and atomic transactions) have been used. DCOM which is used by .NET Enterprise Services with its automatic transaction support is even faster than .NET Remoting. Windows Communication Foundation (WCF) introduced by .NET ...

WCF: Increase the maximum message size quota

01. December 2013 WCF 0
When too much data is transferring via WCF service you need to adjust the maximum message size in the web/app.config of the running application. Example: <system.serviceModel> <bindings> <basicHttpBinding> <binding name=\"basicHttpUserService\" maxBufferPoolSize=\"2147483647\" maxReceivedMessageSize=\"2147483647\"> <readerQuotas maxDepth=\"2147483647\" maxStringContentLength=\"2147483647\" maxArrayLength=\"2147483647\" maxBytesPerRead=\"2147483647\" maxNameTableCharCount=\"2147483647\"/> </binding> <binding name=\"basicHttpBroadcastLogService\" maxBufferPoolSize=\"2147483647\" maxReceivedMessageSize=\"2147483647\"> <readerQuotas maxDepth=\"2147483647\" maxStringContentLength=\"2147483647\" maxArrayLength=\"2147483647\" maxBytesPerRead=\"2147483647\" maxNameTableCharCount=\"2147483647\"/> </binding> </basicHttpBinding> </bindings> </nsystem.serviceModel>

WCF FaultHandling

01. December 2013 WCF 0
The WCF service cannot return a .NET exception to the client. The WCF service and the client communicate by passing SOAP messages. If an exception occurs, the WCF runtime serializes the exception into XML and passes that to the client. By default, the service does not send any information explaining what happened. WCF does not ...