Authentication on WCF Data Service or OData: Windows Authentication Part#1

In this article, I am going to show how to enable windows authentication on WCF Data Service. Follow the below steps Step 1 Create WCF Data Service. Read below how to create WCF Data Service and introduction to OData. http://dhananjaykumar.net/2010/06/13/introduction-to-wcf-data-service-and-odata/ While creating data model to be exposed as WCF Data Service, we need to takeContinueContinue reading “Authentication on WCF Data Service or OData: Windows Authentication Part#1”

IgnoreDataMember attribute in WCF POCO Serialization

POCO stands for PLAIN OLD CLR OBJECT. If  in WCF we are using 1. Complex Data type for example custom class 2. And not attributing this custom class as DataContract and properties of the class as DataMember 3. If we want to expose the below custom class to client and not using DataContractSeraliazer then allContinueContinue reading “IgnoreDataMember attribute in WCF POCO Serialization”

Inserting element in sorted Generic list (List) using binary search in C#

I got a mail asking, “How we could insert an item in sorted generic list such that after insertion list would be remaining sorted?” Answer of this is using Binary Search As we know Binary search works on Divide and conquer algorithm. And running time using Binary search is very efficient. So we need toContinueContinue reading “Inserting element in sorted Generic list (List) using binary search in C#”

Sorting a Generic List in C#

Objective This article will give code snippet on how to sort a generic list in C# I have a class called Product Product.cs class Product     {         public string ProductName { get; set; }         public int ProductPrice { get; set; }     } And List of Product as below,  List<Product> prdListContinueContinue reading “Sorting a Generic List in C#”

Removing .SVC from WCF REST Service

I got a mail asking question, “How could we remove .SVC from a WCF REST Service? “ For example, instead of We need to remove, .svc extension from address of the WCF service. Let us say, you have a WCF REST Service up and running http://localhost:58230/Service1.svc/GetMessage With output Read here: How to create a WCFContinueContinue reading “Removing .SVC from WCF REST Service”

Consuming WCF REST Service in ASP.Net Web Site

Objective This article will give a quick walkthrough on how to consume a WCF REST Service in ASP.Net Web site. 1. Create a WCF REST Service. 2. Consume the Service in ASP.Net Web Site Create a WCF REST Service Step 1 Create a WCF application. To create a new application File -> New -> Web->ContinueContinue reading “Consuming WCF REST Service in ASP.Net Web Site”

WCF 4.0 service consumed in Silverlight 4.0 avoiding cross domain problem

Objective This article will explain how to call WCF 4.0 service hosted in IIS 7.5 in a Silverlight application. This article will explain the way to avoid cross domain problem also. Expected Output When user will click on + button a WCF service hosted on IIS will get called. As a input parameter to serviceContinueContinue reading “WCF 4.0 service consumed in Silverlight 4.0 avoiding cross domain problem”

Walkthrough on creating WCF 4.0 Service and Hosting in IIS 7.5

Objective This article will give step by step walkthrough 1. How to create a basic WCF 4.0 Service? 2. How to host WCF Service in IIS 7.5? 3. Hot to test service in a client. Create WCF Service Create WCF service. Open visual studio select new project and then from WCF tab select WCF ServiceContinueContinue reading “Walkthrough on creating WCF 4.0 Service and Hosting in IIS 7.5”

Delegate to Lambda Expression

Objective This article will not give any theoretical definition of 1. Delegate Read theory of Delegate here 2. Anonymous method 3. Lambda Expression Read theory of Lambda expression here I am going to give a story type discussion from Delegate to Lambda expression. Let us say, there is a requirement that you need to passContinueContinue reading “Delegate to Lambda Expression”