Three way to form URI for REST Services

Objective In this article, I will show how we could construct URI in three ways. Method # 1: Creating URI from string I am passing string in constructor of URI class, to create new URI. Output Method #2 New URI from Component Instance I am here taking host and path individually and then combining them … Continue reading Three way to form URI for REST Services

Video on Picture Gallery for Windows 7 Phone using WCF REST Service

IService1.cs 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Runtime.Serialization; 5 using System.ServiceModel; 6 using System.ServiceModel.Web; 7 using System.Text; 8 using System.IO; 9 10 namespace PictureService2 11 { 12 13 [ServiceContract] 14 public interface IService1 15 { 16 [OperationContract] 17 [WebGet(UriTemplate="/GetFiles")] 18 List<string> GetFilesName(); 19 20 21 [OperationContract] 22 [WebGet(UriTemplate="/GetImage/{imageName}")] 23 Stream … Continue reading Video on Picture Gallery for Windows 7 Phone using WCF REST Service

Learning Video on Creating basic WCF REST Service

Full source code for your reference is as below, IService1.cs using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.ServiceModel.Web; using System.Text; namespace WcfService3 { [ServiceContract] public interface IService1 { [OperationContract] [WebGet] string GetDataUsingMethod(string value); [OperationContract] [WebGet(UriTemplate="/GetData/{value}")] string GetDataUsingURI(string value); } } Service1.svc.cs using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; … Continue reading Learning Video on Creating basic WCF REST Service

Uri Template in WCF REST Service Part#1

Objective This article will give explanation about UriTemplate class in WCF REST Service. We will see how UriTemplate class helps us to construct the URI for the methods. UriTemplate class This class is used to construct URI for the methods in WCF REST Service. It is inside the namespace System.ServiceModel.Web. UriTemplate class How it works? … Continue reading Uri Template in WCF REST Service Part#1

Self Hosted WCF REST Service or Hosting WCF REST Service in Console Application

Objective In this article, I will show you 1. How to create a REST based service? 2. How to host a REST based service in Console application? 3. How to consume a REST Service at client? Follow the steps as below, Step1 Create a New project. Select Console application as project type. Step 2 Add … Continue reading Self Hosted WCF REST Service or Hosting WCF REST Service in Console Application

Picture Gallery for Windows 7 Phone using WCF REST Service

Objective In this article I will give you walkthrough of creating a Picture Gallery for Windows 7 phone. I will show how to fetch images from server using WCF REST service. The final output would be like below Please read this article before going through this article. In this article, majorly I am going to … Continue reading Picture Gallery for Windows 7 Phone using WCF REST Service

Consuming basic REST service in Windows 7 mobile application

Objective In this article I am going to explain how to consume a REST service in windows 7 phone app. We will achieve this is two steps Create and Host REST based WCF service Consume service in W7 phone application. Create and host REST service There are many article, I have written discussing REST service. … Continue reading Consuming basic REST service in Windows 7 mobile application

Get an Image using WCF REST service

Objective This article will give a very simple and basic explanation of , how to fetch an image using WCF REST service. Step 1 Create a WCF application. To create a new application File -> New -> Web-> WCF Service Application.Remove all the default code created by WCF. Remove code from IService 1 interface and … Continue reading Get an Image using WCF REST service

Solving Caching problem of IE for WCF REST service

Objective This article will explain; how to solve the caching problem in IE while making call to for REST enabled WCF service. Client might be a SILVERLIGHT client or AJAX client. Background Read my other articles on WCF REST service for better understanding of this article. Is REST service and a web page is same? … Continue reading Solving Caching problem of IE for WCF REST service