background preloader

Code Samples

Facebook Twitter

5 Ways to submit an InfoPath form to a SharePoint list - InfoPath Solutions Blog. Developing a REST Web Service using C# - A walkthrough. Download source code - 76.5 KB Objective The objective of this article is to create a REST Web Service using C# which will support CRUD operations on the exposed object.

Developing a REST Web Service using C# - A walkthrough

This article concentrates on building the Web Service from scratch using HttpHandlers, and will give a detailed understanding of operations that happen “under the hood”. There are many documents which talk about REST Web Services, but hardly any which gives a complete code walkthrough. This is just what I intend to do. Introduction REST stands for Representational State Transfer. In a nutshell, REST is based on the representation of resources. Example – Let us consider a Web Service that returns Employee information.

So if we want to get Employee information, we send an HTTP GET on the object Employee rather than query a method like GetEmployee(). For further reading, see the References section at the end of the article. Why use REST? Let us consider a practical example. HTTP verbs Example: HTTP handlers The project Example: .NET 4.0 RESTful Web Service Introduction. REST - REpresentational State Transfer REST is not a standard but an approach (specification) to developing and providing services on the internet.

.NET 4.0 RESTful Web Service Introduction

REST follows an architectural style of web application, like a user progressing through a web application by selecting links which takes him to the next page. REST is based on Resources that are identified by a unique URI. When we conform to the standard or characteristic defined for a service to be REST, we can refer the service to be RESTful.

REST does not tie itself to any particular platform, but is currently done on Web with HTTP. Fundamental Characteristics / Constraints of REST Client Server Separation of Concerns is a principle where the user interface is separated from data storage. Stateless Each request to the server should contain all the information required to understand and complete the request. Cacheable The data within a response to a request should be cacheable/ non-cacheable to be used by client at another point of time. WPF.WCF Chat Application Simplified via P2P. Introduction This article attempts to further the efforts put forth by Sacha Barber who demonstrated in his fantastic article how to use WCF to create a TCP based chat service and hook up the output to a WPF front-end.

WPF.WCF Chat Application Simplified via P2P

If you haven't read the article, I highly recommend you do so first in order to get a good explanation of WCF transports and building service classes.