WebLog Posts in Category WCF
WCF WS-Security and WSE Nonce Authentication
November 24, 2012 @ 5:31am

I ran into a Web Service last week that required WS-Security headers with an embedded nonce value. Unfortunately WCF doesn't support this particular protocol directly. Here's how to create custom credentials and a tokenizer to write out the customized WS-Security header.

13 comments
Allowing Access to HttpContext in WCF REST Services
January 10, 2011 @ 1:02pm

WCF REST Services do not make it easy to access all the features of the HTTP protocol, so in some situations it's just much easier to use ASP.NET compatibility to get direct access to the HttpContext object for access of all the HTTP headers and features.

7 comments
WCF REST Service Activation Errors when AspNetCompatibility is enabled
January 06, 2011 @ 2:54pm

Ran into a version problem with WCF REST Services when using on IIS and with ASP.NET Compatibility enabled. Turns out there's a potential version conflict in the system .config files that can cause this error to creep up - here's how to fix it.

1 comment
AspNetCompatibility in WCF Services – easy to trip up
April 12, 2010 @ 3:51pm

When using ASP.NET compatiblity in WCF REST services you'll want to be very careful in matching your configuration settings and service attributes in the correct combination or you may end up with unpleasant and hard to find ServiceActivationExceptions.

4 comments
Monitoring HTTP Output with Fiddler in .NET HTTP Clients and WCF Proxies
January 14, 2009 @ 12:36am

Http debugging is immensely useful and Fiddler is a nice tool that provides many options and an easy to use interface to monitor HTTP requests to get maximum information about each request. In order to monitor requests of .NET clients like WebClient, HttpWebRequest or WCF or Web Service proxies you need a little additional configuration to get Fiddler to monitor these requests.

46 comments
Removing the .SVC Extension from WCF REST URLs
December 15, 2008 @ 4:27pm

One of the most frequent questions that come up when talking about WCF REST urls is how to remove the .SVC extension from the endpoint Url for a REST service. While it's not automatic, there are a couple of fairly simple solutions to this problem: Using the IIS 7 Rewrite Module or a small custom module.

15 comments
jQuery and ASP.NET Article Part 2 Posted
December 03, 2008 @ 2:26am

I've posted Part 2 of my jQuery with ASP.NET article series. Part 2 deals almost entirely with making AJAX callbacks to ASP.NET using several different mechanisms to retrieve data from the server for client side consumption. Covered are external content retrieval, same page callbacks, WCF/ASMX and a pluggable custom callback implementation that can be used with any application. Also covered is client side templating for managing HTML in one place.

63 comments
WCF REST Services and AJAX Callbacks
November 26, 2008 @ 2:10pm

I've been getting a lot of questions in response to my WCF REST session in regards of whether I'd recommend switching to WCF from ASMX services for AJAX functionality recently. WCF provides a host of new REST features, but when it comes to AJAX functionality and especially ASP.NET AJAX compatible functionality there's really nothing compelling there to require changes. In this post I look at what WCF provides for AJAX and some of the things you might watch out for.

14 comments
Debugging a WCF REST/AJAX Serialization Problem
November 04, 2008 @ 12:06am

Ran into a painful self-inflicted problem today with WCF Services for AJAX access where a service failed to serialize some data and simply returned no data of any sort. No error, no message - no HTTP content, not even headers. Here's what the problem was and the steps to debug the service to try and figure out what was wrong.

7 comments
Updated jQuery and WCF 3.5 JSON Samples posted
June 25, 2008 @ 5:58am

I've updated my slides and samples for last spring's Devconnection's sessions to reflect some of the recent updates in jQuery and jQuery.ui, which now have been updated to release versions. In addition there have been a few bug fixes and better configuration documentation for the samples.

2 comments
Crashing WCF 3.5 JSON Services with DateTime.MinValue
June 23, 2008 @ 5:53am

Ran into some odd issues with WCF 3.5 and HTTP JSON services hanging up an ASP.NET application. It appears that there are a couple of problems with null serialization and small date value serialization that are causing this problem.

9 comments
jQuery AJAX calls to a WCF REST Service
April 21, 2008 @ 12:52pm

Here's an overview of how to call WCF REST services with jQuery. The basic process is very easy, but if you want to handle the formats that Microsoft sends down reliably, you have to make some format choices and deal with JSON encoding and decoding that is not native to jQuery.

70 comments
WCF REST Configuration for ASP.NET AJAX and plain REST Services
April 10, 2008 @ 7:56pm

.NET 3.5 includes WCF REST service functionality that allows for cleaner HTTP access to services. For AJAX applications this means that WCF can now be used both for MS AJAX clients as well as non-MS AJAX clients like jQuery or Prototype. This post focuses on setting up and configuring WCF for REST operation with a focus on AJAX scenarios looking at some of the different configuration options available.

23 comments
Debugging Http or Web Services Calls from ASP.NET with Fiddler
March 14, 2008 @ 12:45am

If you've tried to trace Http requests to Web Services or WebRequest calls in an ASP.NET application you've probably found although ASP.NET requests show up in tools like Fiddler or Charles, but the Web Service or WebRequest/WebClient calls do not. You can make this work however by modifying the proxy settings in web.config explicitly.

9 comments
DataContractJsonSerializer in .NET 3.5
December 29, 2007 @ 9:01am

.NET 3.5 includes a new DataContractJsonSerializer that makes it real easy for serializing and deserializing .NET objects to and from JSON. This post shows code for simple serialization and deserialization as well as discussion of some of the features and limitations.

51 comments
ClientScriptProxy and JavaScript Linking In Headers
December 27, 2007 @ 7:46pm

.NET 3.5 includes a new DataContractJsonSerializer that makes it real easy for serializing and deserializing .NET objects to and from JSON. This post shows code for simple serialization and deserialization as well as discussion of some of the features and limitations.

3 comments
WCF Clients and COM Interop
December 16, 2007 @ 4:42pm

One thing that may not be real obvious when moving WCF client code from say Web Service References is that the Web Service clients generated for WCF are not easily accessible via COM Interop. With ASMX services the proxy classes generated used to marshal fine over COM and so it was possible to...

ClientBase<T> and a Common Base Class
December 14, 2007 @ 6:33am

I've been racking my head over a 'generic' problem in relation to a WCF Web service client. I have an component that acts as a Web Service wrapper to proxy calls between a non-.NET client and a WCF Web Service client. The calls are working fine, but we have a rather large number of services that...

7 comments
Generated Date Types in WCF and unexpected 'dateSpecified' fields
December 13, 2007 @ 12:32pm

I just ran into a little issue with a Web Service imported through the WCF Service Utility. The issue revolves around dates imported for a service. In the WSDL the layout looks like this: <xsd:complexType name="NewEnrolment">   <xsd:sequence>    ...

7 comments
Tracing WCF Messages
December 09, 2007 @ 6:55pm

I'm working on a small problem that involves connecting to a Web Service and using WS-Security and I'm using WCF. It's not going well and so I've been trying to trouble shoot exactly what's going on. WCF is pretty good about reporting error messages and generally pointing you in the right direction...

18 comments
WCF and segmented WSDL Files = Problems
October 30, 2007 @ 2:45am

Web Services in Windows Communication Framework publish their WSDL in a different format than ASMX based services did and this can cause some problems with 'legacy' SOAP clients. Legacy ahem in this case makes up a rather large set of tools that won't work with WCF services out of the box. WCF publishes the WSDL with discreet XSD schemas for each of the subsections which results in an XML document that pulls from the server. For example here's a simple WSDL output...

WCF, Web Service Clients and Http Debugging Proxies
October 27, 2007 @ 9:36pm

I depend heavily on using Fiddler or Charles for helping me debug Http issues in general and both work great for typical Web development debugging in the browser. This is especially useful for AJAX applications since you can't 'see' the output that travels over the wire directly most of the...

3 comments
WCF and JSON Services
October 04, 2007 @ 2:50am

I took a quick look today at WCF's new capability to work with JSON data. I was looking forward to having WCF services providing this functionality and there are a few cool things that work with it. It's now essentially possible to create WCF Web Services that take JSON as input and produce...

29 comments
Adding a WCF MetaData EndPoint programmatically
November 30, 2006 @ 1:59pm

WCF Services need to expose their meta data explicitly. Commonly this is done via .Config file settings, but it can also be done programmatically.

5 comments
ASMX Web Services and WCF Client Oddities
November 29, 2006 @ 4:35am

I ran into some issues today with an ASMX Web Service called from a WCF client. Part of the problem is behavior differences of the entire service depending on whether a DataSet based method signature is included in the service or not.

11 comments
Checking out Windows Communication Foundation Serialization
November 27, 2006 @ 8:52pm

So I spent a bit of time this evening mucking around with WCF Serialization. The efficiency, complexity and usability of Serialization is a key component in using any technology that needs to communicate data over service/application boundaries and so this is usually one of the first things I take a look at. WCF is pretty impressive in this regards for its flexibility and implementation.

12 comments
WCF Web Service Proxy Generation Problems
November 20, 2006 @ 1:54pm

So I’m a latecomer to the WCF party and just to check things out I decided to run a quick check against some existing complex Web Services I have running on my site. I created a new WinForms project and added a new Service Reference (installed with the Orcas bits). The importer managed to...

3 comments


West Wind  © Rick Strahl, West Wind Technologies, 2005 - 2014