background preloader

WCF

Facebook Twitter

Understanding the Basics of Web Service in ASP.NET. Download source - 8.3 KB Introduction This article aims at understanding the need for a web service, the benefits of having a web service and how we can create a basic web service and consume it.

Understanding the Basics of Web Service in ASP.NET

Background Connectivity between applications is very important. Using C# 4.0 and dynamic to parse JSON. UPDATE: take a look at before you try and roll your own, it supports dynamic now...

Using C# 4.0 and dynamic to parse JSON

I recently had to get a JSON feed from the web and traverse it. Like any good developer I started off with a Bing search and stumbled across a few posts. The first by Nikhil Kothari looked interesting but his implementation did way too much, all I needed to do was read a JSON file, did I really need all that code. The second post I saw by Alex Ghiondea again looked interesting but relied on a library from codeplex (JSON.NET, and again I thought this was a bit overkill for my project. But Nikhil’s post did get me thinking that this might be a good place to use the new dynamic “type” in C# 4.0. The JavaScriptSerializer class is used internally by the asynchronous communication layer to serialize and deserialize the data that is passed between the browser and the Web server. To use the JavaScriptSerializer (from the System.Web.Extensions dll) you have to implement a JavaScriptConverter. Return null; } JSON API. Table of Contents.

JSON API

REST in Windows Communication Foundation (WCF) Simple REST implementation with WebHttpBinding Blog from Saravanan Arumugam. REST – REpresentational State Transfer, is an architectural style for distributed communication.

Simple REST implementation with WebHttpBinding Blog from Saravanan Arumugam

Here in this paper I am going to talk about the implementation of RESTful services in WCF. A few bullet points about REST in WCF WebHttpBinding was introduced in WCF with .Net Framework 3.5 to support REST. REST based services can be simply called by an Http Url. Due its simplicity it is preferred in Internet based services (like Facebook, Twitter, MySpace etc.). Well, the downsides are, SOAP, REST, and More. Service Station More On REST Jon Flanders In the last two columns, I've described the basics of REST and talked about exposing and consuming Web feeds.

SOAP, REST, and More

Basic Authentication on a WCF Rest service. Download source code (VS2010) - 240 KB Contents Introduction This article explains a method to secure a REST based service using Basic Authentication.

Basic Authentication on a WCF Rest service

The service itself is implemented using Microsoft Windows Communication Foundation. The authentication of the credentials should be possible against any type of backend. Although Basic Authentication is a method to secure a web site or service, the authentication mechanism itself is not secure. This article and the provided source code can be used in two ways. WCF Webcast Series. I delivered 15 webcasts on WCF this summer, from July through September.

WCF Webcast Series

Each webcast is 1 hour in length, touching on the fundamentals and practical approaches for your WCF development efforts. Here are the links to the archived webcasts! NOTE: On page 3 of the registration process you can print the slides. · MSDN Webcast: Windows Communication Foundation Top to Bottom (Part 01 of 15): Overview Monday, July 02, 2007 9:00 AM Pacific Time (US & Canada) o. Xml - REST / SOAP endpoints for a WCF service. Create RESTful WCF Service API: Step By Step Guide. Download source - 9.29 KB Introduction.

Create RESTful WCF Service API: Step By Step Guide

WCF Could not establish trust relationship for the SSL/TLS secure channel with authority codemeit. By admin - Last updated: Saturday, February 21, 2009 - Save & Share - 22 Comments I saw people ask questions on the forums regarding to “Could not establish trust relationship for the SSL/TLS secure channel with authority” while attempting to call the web service via a host domain name other than the one specified in Issue-To within the SSL certificate.

WCF Could not establish trust relationship for the SSL/TLS secure channel with authority codemeit

Most likely you are using the same certificate for the WCF web services hosted on other domains, for example, development or demo server. A custom remote certificate validation can be used to avoid the strict validation, instead, just make it trust anything. In your code, simply make a call to the static method SetCertificatePolicy() once within your application before making any request to the web services. WCF POX, JSON and SOAP Coexist codemeit. WCF POX, JSON and SOAP Coexist By admin - Last updated: Monday, August 16, 2010 - Save & Share - 29 Comments.

WCF POX, JSON and SOAP Coexist codemeit

How to enable PUT and DELETE verbs on IIS 7 : The Official Microsoft IIS Site. Issue Hosting RESTful services on IIS 7 Nikhil Thaker's Blog. For last 3-4 days I am trying to understand the RESTful architecture for applications. And so for start I have created a sample REST service using “WCF REST Service Application” template in Visual Studio 2010 RC and .Net Framework 4. At first I have tested service operations of my REST service with ‘GET’ & ‘POST’ and they were working absolutely OK. (I have not created any client yet to test my RESTful service but I am using ‘Fiddler‘ for the purpose.) Now when I have started testing with ‘PUT’ verb in my request to REST service through fiddler, it has returned Http Error 405 (‘Method not Allowed’). Then I started testing ‘DELETE’ and it was also not working with the same Http Error 405.

As I am like newbie to REST Services and IIS stuff and all that, I have not understand the error described in Image above. Link to IIS Forum My thread ==> Introducing WCF WebHttp Services in .NET 4 - The .NET Endpoint. This is a great series and gave me a great jump start on building a WCF REST service. I just wanted to post a few gotchas that I encountered when deploying to IIS 6. These mostly pertain to using routes (no svc file) so if you're using a svc these may not apply. 1.

If you use routes you won't have an extension so you need to use a wildcard application map. - IMPORTANT: Make sure you select the 4 version of the aspnet_isapi.dll - IMPORTANT: When setting up the wildcard, make sure the checkbox for "Verify that file exists" is unchecked. Instructions for setting up the wildcard mapping can be found here (thanks to Maarten Balliauw for the great article): WCF Demystified. Keith Elder is the host of the popular online technology podcast Deep Fried Bytes.

He is also a Team Leader / Sr. Software Engineer for Quicken Loans, the nation's largest online mortgage lender based in Livonia, MI and is the founder of the Hattiesburg, MS .Net User Group called Hub City NUG. Keith is an experienced technologist, systems administrator, software engineer, speaker, trainer and all around geek. As an experienced educator, trainer and speaker he has logged thousands of hours in front of the classroom teaching students of varying ages from the 6th grade to the college level. He has trained countless developers from various business sectors ranging from top auto manufactures, fortune 500 companies and Universities.

As a {*style:<a href=' MVP{*style:</a>*} and {*style:<a href=' speaker he speaks throughout the United States at major technical conferences, Code Camps, and .Net User Groups. Writing the WCF Hello World App. Okay first of all, you must read my "What is WCF" blogpost, where I build up to "What makes WCF so different". But, I'll repeat the last paragraph here - So, what makes WCF different?

You first think of the Contract - What am I trying to get done!? Then you think of where will I host it, and what technology will I use to host it. Then you worry about the nitty gritties such as authentication etc. In keeping with that theme, let us describe my Hello World problem first. Writing your first WCF client. This is in continuation to writing your first WCF service. Now, that you've packaged that very valuable "Hello World" functionality, you need to next write some code to check and see if you can indeed use such a service. There could be 2 situations here a) You have pre-distributed the metadata as a definition of the interface, or a dll that contains the IHelloWorld interface., OR b) You expect clients to generate proxies on the fly, by using the metadata that you expose using the mex end point.

Y'know, option #b is simpler, so I'm gonna talk about that first. Go ahead and create a new console app.Add a new service reference to .. which incidently was the same endpoint address that you were exposing the metadata endpoint at.