How to register WCF with IIS and ASP.NET

If we have installed .NET framework before installing IIS on our machine and we wanted to deploy a WCF service. Then we need to do some additional steps by registering Windows Communication Foundation with IIS and ASP.NET. This WCF tutorial focuses on  simple steps to resolution. Firstly, register ASP.NET with IIS by executing following: C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis… Read More »

Top 10 WCF Interview Questions

A must have list of WCF Interview Questions that are asked during an Interview on hot topics with detailed answers and examples. After preparing following questions, reader will feel more comfortable about many key concepts in Microsoft Windows Communication Foundation. Along with these top 10 WCF Interview Questions, another complete four parts list of Interview… Read More »

4 simple steps to enable tracing in WCF

Tracing mechanism in Windows Communication Foundation is based on the classes that resides in System.Diagnostic namespace. Important classes are Trace, TraceSource and TraceListener. For better understanding we will follow step by step approach in this WCF Tutorial. Following are the steps to enable tracing in WCF: Step 1. Configuring WCF to emit tracing information/Define Trace Source… Read More »

Serializer Vs Encoder in WCF

Object Graph >>——(Serializer)——>> WCF Message >>———(Encoder)——->>Byte Stream In Windows Communication Foundation, Object graph is rendered to WCF Message by a serializer, while further that WCF Message is tranformed to byte stream by an Encoder so that itcan be transported on wire.WCF provides twoserializers toperform the job of rendering toWCF Message from object graph. DataContract Serializer XmlSerializer… Read More »

WCF Service – Bindings default security

When we talk about security in Windows Communication Foundation, Itcan be at two different levels i.e. Transport Level Security Message Level Security Different WCF bindings have security defaults as follows: 1. BasicHttpBinding No Security Interopable with ASMX Web Services 2. WsHttpBinding Message Level Security SOAP Messages are encrypted 3. NetTcpBinding Transport Level Security Packets are encrypted… Read More »

.NET Exceptions Vs WCF Faults

Exception is a .NET mechanism used to communicate problems encountered during the execution of a program. Various .NET languages allows us to throw, catch/handle or possibly ignore exceptions so that it can be further propagated up to the call stack. C# sample code for handling exception in .NET applications below explains it as:  int x = 0;  int result… Read More »

WCF Service – What is a KnownType?

In Windows Communication Foundation, a KnownType is the acceptable derived class for a given Data Contract. Using WCF Data Contract Known Types by Example For the purpose of understanding in this WCF Tutorial, lets take an example. Consider the following Data Contract classes having inheritance relationship as follows:    [DataContract]    public class UserAccount {}… Read More »