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”
Author Archives: Dhananjay Kumar
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”
Callback Reentrancy or returning values in callback or duplex service
PART#1 of this article is here Objective: This article will explain how to return values in call back or duplex operation. Before reading this article, I strongly recommend to read my first article post on this series. This article is fully based on the A Simple Duplex Service in WCF. If you read above article,ContinueContinue reading “Callback Reentrancy or returning values in callback or duplex service”
A Simple Duplex Service in WCF
Objective This article will give step by step explanation on how to create a simple duplex service in WCF. In call back operation or duplex service, Service can also call some function at the client . 1. Duplex service allows calling back some operation (function) on the client. 2. Duplex service also knows as CallContinueContinue reading “A Simple Duplex Service in WCF”
Anonymous types in C# 3.0
1. Anonymous types are new feature being added in C# 3.0. 2. These are data types being generated on the fly at the run time. 3. These data types are generated through complier rather than explicit class definition. Program.cs using System;using System.Collections.Generic;using System.Linq;using System.Text; namespace ConsoleApplication17{ class Program { static void Main(string[] args) { ContinueContinue reading “Anonymous types in C# 3.0”
Collection initializer in C# 3.0
1. Collection initializer is new feature of C# 3.0 2. Collection initializer gives a simple syntax to create instance of a collection. 3. Any object that is implementing System.Collections.Generic.ICollection<T> can be initialized with collection initializer. Let us say, we have a class Student.cs public class Student { public string FirstName { get;ContinueContinue reading “Collection initializer in C# 3.0”
Expand and Load: Fetching related entities in WCF Data Service
Objective In this post, I will show you how to retrieve data from related entities in WCF Data Service. If you are new to this topic, please read Introduction to WCF Data service and ODATA before going through below article Let us say, we want to fetch details from related entities Customers and Order. ThereContinueContinue reading “Expand and Load: Fetching related entities in WCF Data Service”