<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Shawson&#039;s Code Blog &#187; WCF</title>
	<atom:link href="http://codeblog.shawson.co.uk/category/net/wcf/feed/" rel="self" type="application/rss+xml" />
	<link>http://codeblog.shawson.co.uk</link>
	<description>development notes for my failing memory</description>
	<lastBuildDate>Wed, 01 Feb 2012 11:00:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Ninject + WCF Docs</title>
		<link>http://codeblog.shawson.co.uk/ninject-wcf-docs/</link>
		<comments>http://codeblog.shawson.co.uk/ninject-wcf-docs/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 13:22:08 +0000</pubDate>
		<dc:creator>shawson</dc:creator>
				<category><![CDATA[C#.net]]></category>
		<category><![CDATA[OO Design]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://codeblog.shawson.co.uk/?p=1262</guid>
		<description><![CDATA[I&#8217;ve recently started using Ninject, having previously only used Unity as my IoC container, but it seems the internet is scarce of any documentation. I&#8217;ve employed the WCF extension, and found this handy guide on how to get up and going with it. www.aaronstannard.com/post/2011/08/16/dependency-injection-ninject-wcf-service.aspx ps- This is my 200th blog post! Woohoo! Related posts:C# Dynamic [...]


Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/c-dynamic-keyword-and-how-you-can-use-it-to-help-tdd/' rel='bookmark' title='C# Dynamic keyword, and how you can use it to help TDD!'>C# Dynamic keyword, and how you can use it to help TDD!</a></li>
<li><a href='http://codeblog.shawson.co.uk/getting-started-with-wcf-and-rest-web-services/' rel='bookmark' title='Getting started with WCF and REST web services'>Getting started with WCF and REST web services</a></li>
<li><a href='http://codeblog.shawson.co.uk/making-your-wcf-service-compatible-with-legacy-net-1-1-applications/' rel='bookmark' title='Making your WCF Service compatible with legacy .net 1.1 applications'>Making your WCF Service compatible with legacy .net 1.1 applications</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently started using Ninject, having previously only used Unity as my IoC container, but it seems the internet is scarce of any documentation.  I&#8217;ve employed the WCF extension, and found this handy guide on how to get up and going with it.  <a href="http://www.aaronstannard.com/post/2011/08/16/dependency-injection-ninject-wcf-service.aspx" target="_blank">www.aaronstannard.com/post/2011/08/16/dependency-injection-ninject-wcf-service.aspx</a></p>
<p>ps- This is my 200th blog post! Woohoo!</p>


<p>Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/c-dynamic-keyword-and-how-you-can-use-it-to-help-tdd/' rel='bookmark' title='C# Dynamic keyword, and how you can use it to help TDD!'>C# Dynamic keyword, and how you can use it to help TDD!</a></li>
<li><a href='http://codeblog.shawson.co.uk/getting-started-with-wcf-and-rest-web-services/' rel='bookmark' title='Getting started with WCF and REST web services'>Getting started with WCF and REST web services</a></li>
<li><a href='http://codeblog.shawson.co.uk/making-your-wcf-service-compatible-with-legacy-net-1-1-applications/' rel='bookmark' title='Making your WCF Service compatible with legacy .net 1.1 applications'>Making your WCF Service compatible with legacy .net 1.1 applications</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://codeblog.shawson.co.uk/ninject-wcf-docs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WCF Services with both JSON and SOAP endpoints</title>
		<link>http://codeblog.shawson.co.uk/wcf-services-with-json-and-soap-endpoints/</link>
		<comments>http://codeblog.shawson.co.uk/wcf-services-with-json-and-soap-endpoints/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 13:14:26 +0000</pubDate>
		<dc:creator>shawson</dc:creator>
				<category><![CDATA[WCF]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://codeblog.shawson.co.uk/?p=1195</guid>
		<description><![CDATA[A quick example of how to set this up in the web.config. Services, in this example, can be accessed using JSON via localhost/Services/MyService.svc/HelloWorld or.. using SOAP on localhost/Services/MyService.svc/soap/HelloWorld &#60;system.serviceModel&#62; &#60;serviceHostingEnvironment multipleSiteBindingsEnabled=&#34;true&#34; aspNetCompatibilityEnabled=&#34;true&#34; /&#62; &#60;services&#62; &#60;service behaviorConfiguration=&#34;WebServiceBehavior&#34; name=&#34;Demo.Web.Services.MyService&#34;&#62; &#60;endpoint address=&#34;&#34; binding=&#34;webHttpBinding&#34; contract=&#34;Demo.Web.Services.IMyService&#34; behaviorConfiguration=&#34;jsonBehavior&#34; /&#62; &#60;endpoint address=&#34;soap&#34; binding=&#34;basicHttpBinding&#34; contract=&#34;Demo.Web.Services.IMyService&#34;/&#62; &#60;/service&#62; &#60;/services&#62; &#60;behaviors&#62; &#60;endpointBehaviors&#62; &#60;behavior name=&#34;jsonBehavior&#34;&#62; &#60;webHttp defaultOutgoingResponseFormat=&#34;Json&#34; [...]


Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/getting-started-with-wcf-and-rest-web-services/' rel='bookmark' title='Getting started with WCF and REST web services'>Getting started with WCF and REST web services</a></li>
<li><a href='http://codeblog.shawson.co.uk/making-your-wcf-service-compatible-with-legacy-net-1-1-applications/' rel='bookmark' title='Making your WCF Service compatible with legacy .net 1.1 applications'>Making your WCF Service compatible with legacy .net 1.1 applications</a></li>
<li><a href='http://codeblog.shawson.co.uk/web-services-debugging-with-fiddler-2/' rel='bookmark' title='Web Services Debugging with Fiddler 2'>Web Services Debugging with Fiddler 2</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>A quick example of how to set this up in the web.config.</p>
<p>Services, in this example, can be accessed </p>
<ul>
<li>using JSON via localhost/Services/MyService.svc/HelloWorld or..</li>
<li>using SOAP on localhost/Services/MyService.svc/soap/HelloWorld </li>
</ul>
<pre class="brush: xml">
  &lt;system.serviceModel&gt;
    &lt;serviceHostingEnvironment multipleSiteBindingsEnabled=&quot;true&quot; aspNetCompatibilityEnabled=&quot;true&quot; /&gt;

    &lt;services&gt;
      &lt;service behaviorConfiguration=&quot;WebServiceBehavior&quot; name=&quot;Demo.Web.Services.MyService&quot;&gt;
        &lt;endpoint address=&quot;&quot; binding=&quot;webHttpBinding&quot; contract=&quot;Demo.Web.Services.IMyService&quot; behaviorConfiguration=&quot;jsonBehavior&quot; /&gt;
        &lt;endpoint address=&quot;soap&quot; binding=&quot;basicHttpBinding&quot; contract=&quot;Demo.Web.Services.IMyService&quot;/&gt;
      &lt;/service&gt;
    &lt;/services&gt;

    &lt;behaviors&gt;
      &lt;endpointBehaviors&gt;
        &lt;behavior name=&quot;jsonBehavior&quot;&gt;
          &lt;webHttp defaultOutgoingResponseFormat=&quot;Json&quot; /&gt;
        &lt;/behavior&gt;
      &lt;/endpointBehaviors&gt;

      &lt;serviceBehaviors&gt;
        &lt;behavior name=&quot;WebServiceBehavior&quot;&gt;
          &lt;serviceMetadata httpGetEnabled=&quot;true&quot; /&gt;
          &lt;serviceDebug includeExceptionDetailInFaults=&quot;true&quot; /&gt;
        &lt;/behavior&gt;
      &lt;/serviceBehaviors&gt;
    &lt;/behaviors&gt;

    &lt;bindings&gt;
      &lt;webHttpBinding&gt;
        &lt;binding crossDomainScriptAccessEnabled=&quot;false&quot; name=&quot;httpBinding&quot; /&gt;
      &lt;/webHttpBinding&gt;
    &lt;/bindings&gt;

  &lt;/system.serviceModel&gt;
</pre>


<p>Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/getting-started-with-wcf-and-rest-web-services/' rel='bookmark' title='Getting started with WCF and REST web services'>Getting started with WCF and REST web services</a></li>
<li><a href='http://codeblog.shawson.co.uk/making-your-wcf-service-compatible-with-legacy-net-1-1-applications/' rel='bookmark' title='Making your WCF Service compatible with legacy .net 1.1 applications'>Making your WCF Service compatible with legacy .net 1.1 applications</a></li>
<li><a href='http://codeblog.shawson.co.uk/web-services-debugging-with-fiddler-2/' rel='bookmark' title='Web Services Debugging with Fiddler 2'>Web Services Debugging with Fiddler 2</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://codeblog.shawson.co.uk/wcf-services-with-json-and-soap-endpoints/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why ASMX web services are not an excuse anymore with WCF 4.0 &#8211; Pablo M. Cibraro (aka Cibrax)</title>
		<link>http://codeblog.shawson.co.uk/why-asmx-web-services-are-not-an-excuse-anymore-with-wcf-4-0-pablo-m-cibraro-aka-cibrax/</link>
		<comments>http://codeblog.shawson.co.uk/why-asmx-web-services-are-not-an-excuse-anymore-with-wcf-4-0-pablo-m-cibraro-aka-cibrax/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 19:43:16 +0000</pubDate>
		<dc:creator>shawson</dc:creator>
				<category><![CDATA[C#.net]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.shawson.co.uk/codeblog/?p=774</guid>
		<description><![CDATA[Why ASMX web services are not an excuse anymore with WCF 4.0 &#8211; Pablo M. Cibraro (aka Cibrax). Related posts:WCF Services with both JSON and SOAP endpoints Making your WCF Service compatible with legacy .net 1.1 applications Web Services Debugging with Fiddler 2


Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/wcf-services-with-json-and-soap-endpoints/' rel='bookmark' title='WCF Services with both JSON and SOAP endpoints'>WCF Services with both JSON and SOAP endpoints</a></li>
<li><a href='http://codeblog.shawson.co.uk/making-your-wcf-service-compatible-with-legacy-net-1-1-applications/' rel='bookmark' title='Making your WCF Service compatible with legacy .net 1.1 applications'>Making your WCF Service compatible with legacy .net 1.1 applications</a></li>
<li><a href='http://codeblog.shawson.co.uk/web-services-debugging-with-fiddler-2/' rel='bookmark' title='Web Services Debugging with Fiddler 2'>Web Services Debugging with Fiddler 2</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p><a href="http://weblogs.asp.net/cibrax/archive/2010/09/06/why-asmx-web-services-are-not-an-excuse-anymore-with-wcf-4-0.aspx">Why ASMX web services are not an excuse anymore with WCF 4.0 &#8211; Pablo M. Cibraro (aka Cibrax)</a>.</p>


<p>Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/wcf-services-with-json-and-soap-endpoints/' rel='bookmark' title='WCF Services with both JSON and SOAP endpoints'>WCF Services with both JSON and SOAP endpoints</a></li>
<li><a href='http://codeblog.shawson.co.uk/making-your-wcf-service-compatible-with-legacy-net-1-1-applications/' rel='bookmark' title='Making your WCF Service compatible with legacy .net 1.1 applications'>Making your WCF Service compatible with legacy .net 1.1 applications</a></li>
<li><a href='http://codeblog.shawson.co.uk/web-services-debugging-with-fiddler-2/' rel='bookmark' title='Web Services Debugging with Fiddler 2'>Web Services Debugging with Fiddler 2</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://codeblog.shawson.co.uk/why-asmx-web-services-are-not-an-excuse-anymore-with-wcf-4-0-pablo-m-cibraro-aka-cibrax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WCF 404.3 Errors</title>
		<link>http://codeblog.shawson.co.uk/wcf-404-3-errors/</link>
		<comments>http://codeblog.shawson.co.uk/wcf-404-3-errors/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 08:15:23 +0000</pubDate>
		<dc:creator>shawson</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://www.shawson.co.uk/codeblog/?p=481</guid>
		<description><![CDATA[I built a WCF service recently which would run fine in the visual studio test web server, but when i tried to actually hit it from real life IIS7 also on my local box, i receievd the following error: HTTP Error 404.3 &#8211; Not Found The page you are requesting cannot be served because of [...]


Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/asp-net-roles-and-membership-installed-to-local-sql-express-2008-mdf-file/' rel='bookmark' title='ASP.net Roles and Membership installed to local SQL Express 2008 MDF file'>ASP.net Roles and Membership installed to local SQL Express 2008 MDF file</a></li>
<li><a href='http://codeblog.shawson.co.uk/missing-corrupt-aspxascx-designer-cs-file/' rel='bookmark' title='Missing / Corrupt *.aspx(/ascx).Designer.cs file'>Missing / Corrupt *.aspx(/ascx).Designer.cs file</a></li>
<li><a href='http://codeblog.shawson.co.uk/my-shiny-new-blog/' rel='bookmark' title='My shiny new blog'>My shiny new blog</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>I built a WCF service recently which would run fine in the visual studio test web server, but when i tried to actually hit it from real life IIS7 also on my local box, i receievd the following error:</p>
<h2>HTTP Error 404.3 &#8211; Not Found</h2>
<h3>The page you are requesting cannot be served because of the extension  configuration. If the page is a script, add a handler. If the file should be  downloaded, add a MIME map.</h3>
<p>Luckily, i found the solution on <a href="http://blogs.msdn.com/davidwaddleton/archive/2007/11/02/wcf-and-404-3-errors.aspx">David Waddleton&#8217;s blog</a> and it was as simple as turning on a windows feature in add remove programs- on my vista box i had to go to Control Panel &gt; Programs and features &gt; Turn on/ off Windows features &gt; Microsoft.NET framework 3.0 and tick the WCF activitation options!</p>


<p>Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/asp-net-roles-and-membership-installed-to-local-sql-express-2008-mdf-file/' rel='bookmark' title='ASP.net Roles and Membership installed to local SQL Express 2008 MDF file'>ASP.net Roles and Membership installed to local SQL Express 2008 MDF file</a></li>
<li><a href='http://codeblog.shawson.co.uk/missing-corrupt-aspxascx-designer-cs-file/' rel='bookmark' title='Missing / Corrupt *.aspx(/ascx).Designer.cs file'>Missing / Corrupt *.aspx(/ascx).Designer.cs file</a></li>
<li><a href='http://codeblog.shawson.co.uk/my-shiny-new-blog/' rel='bookmark' title='My shiny new blog'>My shiny new blog</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://codeblog.shawson.co.uk/wcf-404-3-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with WCF and REST web services</title>
		<link>http://codeblog.shawson.co.uk/getting-started-with-wcf-and-rest-web-services/</link>
		<comments>http://codeblog.shawson.co.uk/getting-started-with-wcf-and-rest-web-services/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 09:03:07 +0000</pubDate>
		<dc:creator>shawson</dc:creator>
				<category><![CDATA[REST]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.shawson.co.uk/codeblog/?p=465</guid>
		<description><![CDATA[I&#8217;m building some REST WCF services at the moment and found this great guide online www.robbagby.com/rest/rest-in-wcf-blog-series-index The HiREST stuff shows you how to create fully fledged REST services utilising all of the HTTP verbs. Heres a quick summary of the most useful bits; The service itself is just added to the project as a normal [...]


Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/wcf-services-with-json-and-soap-endpoints/' rel='bookmark' title='WCF Services with both JSON and SOAP endpoints'>WCF Services with both JSON and SOAP endpoints</a></li>
<li><a href='http://codeblog.shawson.co.uk/properties-getting-k__backingfield-appended-to-their-name-in-the-wsdl-file/' rel='bookmark' title='Properties getting &#8220;k__BackingField&#8221; appended to their name in the WSDL file'>Properties getting &#8220;k__BackingField&#8221; appended to their name in the WSDL file</a></li>
<li><a href='http://codeblog.shawson.co.uk/making-your-wcf-service-compatible-with-legacy-net-1-1-applications/' rel='bookmark' title='Making your WCF Service compatible with legacy .net 1.1 applications'>Making your WCF Service compatible with legacy .net 1.1 applications</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m building some REST WCF services at the moment and found this great guide online <a href="http://www.robbagby.com/rest/rest-in-wcf-blog-series-index">www.robbagby.com/rest/rest-in-wcf-blog-series-index</a></p>
<p>The HiREST stuff shows you how to create fully fledged REST services utilising all of the HTTP verbs.</p>
<p>Heres a quick summary of the most useful bits;</p>
<p>The service itself is just added to the project as a normal WCF service.  The following needs adding to the Web.config to setup the end </p>
<p>points;</p>
<pre class="brush: xml">
&lt;system.serviceModel&gt;
  &lt;behaviors&gt;
    &lt;endpointBehaviors&gt;
      &lt;behavior name=&quot;AJAXFriendly&quot;&gt;
        &lt;enableWebScript /&gt;
      &lt;/behavior&gt;
      &lt;behavior name=&quot;RESTFriendly&quot;&gt;
        &lt;webHttp /&gt;
      &lt;/behavior&gt;
    &lt;/endpointBehaviors&gt;
&lt;/behaviors&gt;

&lt;services&gt;
    &lt;service      name=&quot;MyNamespace.AjaxServiceClassName&quot;&gt;
      &lt;endpoint   address=&quot;&quot;
        behaviorConfiguration=&quot;AJAXFriendly&quot;
        binding=&quot;webHttpBinding&quot;
        contract=&quot;CatalogService&quot; /&gt;
    &lt;/service&gt;
    &lt;service      name=&quot;MyNamespace.RESTServiceClassName&quot;&gt;
      &lt;endpoint   address=&quot;&quot;
        behaviorConfiguration=&quot;RESTFriendly&quot;
        binding=&quot;webHttpBinding&quot;
        contract=&quot;MyNamespace.IRESTServiceInterfaceName&quot; /&gt;
    &lt;/service&gt;
  &lt;/services&gt;
&lt;/system.serviceModel&gt;
</pre>
<p>Remember the class names in the web.config need to be fully qualified.</p>
<p>An example class for passing around the service;</p>
<pre class="brush: csharp">
[DataContract]
public class ProductData
{
    [DataMember]
    public int ProductId;

    [DataMember]
    public string ProductName;

    [DataMember]
    public string Description;

    [DataMember]
    public decimal Price;

    [DataMember]
    public string ProductImage;
}
</pre>
<p>The service itself is just a normal WCF service so consists of its usual two parts- the interface and the class.  Here&#8217;s an example interface </p>
<p>demoing the various access methods and return serialisations;</p>
<pre class="brush: csharp">
    [ServiceContract]
    public interface IRESTServiceInterfaceName
    {
        // responds to a GET request to www.mysite.com/Servicename.svc/products/
        // return is serialised to JSON
        [OperationContract]
        [WebGet(UriTemplate = &quot;products/&quot;, ResponseFormat = WebMessageFormat.Json)]
        List&lt;FlotChartSeries&gt; GetProducts();

        // responds to a GET request to www.mysite.com/Servicename.svc/products/{product_id}
        // return is serialised to JSON
        [OperationContract]
        [WebGet(UriTemplate = &quot;products/{product_id}&quot;, ResponseFormat = WebMessageFormat.Json)]
        List&lt;FlotChartSeries&gt; GetProductById(string product_id);

        // responds to a GET request to www.mysite.com/Servicename.svc/products?brand={brand}
        // return is serialised to JSON
        [OperationContract]
        [WebGet(UriTemplate = &quot;products?brand={brand}&quot;, ResponseFormat = WebMessageFormat.Json)]
        List&lt;FlotChartSeries&gt; GetProductsByBrand(string brand);

	// responds to a POST, but still passing a bunch of parameters into the querystring
	// no return type
        [WebInvoke(Method = &quot;POST&quot;, UriTemplate = &quot;product/{product_id}/rate?score={score}&quot;)]
        [OperationContract]
        void PostProductAppRating(string product_id, string score);

	// accepts a POST with a JSON encoded product data, to allow for an update
	// no return
	[WebInvoke(Method = &quot;POST&quot;, UriTemplate = &quot;product/{product_id}&quot;, RequestFormat = WebMessageFormat.Json)]
	void PostProductUpdate(string product_id, ProductData data);

	//responds to a PUT- passing a querystring variable for the filename- it expects the body of the push request to be a file stream
	// no return type
        [WebInvoke(Method = &quot;PUT&quot;, UriTemplate = &quot;products/{product_id}/desktopimage?filename={file_name}&quot;)]
        [OperationContract]
        void PutProductImage(string product_id, string file_name, Stream fileContents);

    }
</pre>
<p>Note the variables in the curly braces must match the real parameters to the method signitures for the value to be automatically mapped.</p>
<p>Responses are generally done using HTTP response codes.  At the top of each method you need to grab the current WebOperationContext which </p>
<p>will allow you to set the return codes;</p>
<pre class="brush: csharp">
    WebOperationContext ctx = WebOperationContext.Current;

    ctx.OutgoingResponse.StatusCode = System.Net.HttpStatusCode.OK;		// .. if everything is ok!
    ctx.OutgoingResponse.StatusCode = System.Net.HttpStatusCode.BadRequest;	// on error
    ctx.OutgoingResponse.StatusCode = System.Net.HttpStatusCode.Created;	// after an insert

    // all of the http response codes are mapped here

    ctx.OutgoingResponse.SetStatusAsNotFound(); // if record cannot be found or similar
</pre>


<p>Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/wcf-services-with-json-and-soap-endpoints/' rel='bookmark' title='WCF Services with both JSON and SOAP endpoints'>WCF Services with both JSON and SOAP endpoints</a></li>
<li><a href='http://codeblog.shawson.co.uk/properties-getting-k__backingfield-appended-to-their-name-in-the-wsdl-file/' rel='bookmark' title='Properties getting &#8220;k__BackingField&#8221; appended to their name in the WSDL file'>Properties getting &#8220;k__BackingField&#8221; appended to their name in the WSDL file</a></li>
<li><a href='http://codeblog.shawson.co.uk/making-your-wcf-service-compatible-with-legacy-net-1-1-applications/' rel='bookmark' title='Making your WCF Service compatible with legacy .net 1.1 applications'>Making your WCF Service compatible with legacy .net 1.1 applications</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://codeblog.shawson.co.uk/getting-started-with-wcf-and-rest-web-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Properties getting &#8220;k__BackingField&#8221; appended to their name in the WSDL file</title>
		<link>http://codeblog.shawson.co.uk/properties-getting-k__backingfield-appended-to-their-name-in-the-wsdl-file/</link>
		<comments>http://codeblog.shawson.co.uk/properties-getting-k__backingfield-appended-to-their-name-in-the-wsdl-file/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 16:58:08 +0000</pubDate>
		<dc:creator>shawson</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[C#.net]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.shawson.co.uk/codeblog/?p=419</guid>
		<description><![CDATA[I was finding k__backingField was being appended to all my object properties when exposed via my a WCF service, in the WSDL.  The solution it turns out was simple- just had to make my class a [DataContract] and mark the properties as [DataMember]. via WCF Data Contracts and “k__BackingField” Property Naming &#8211; Nathan Bridgewater. Related [...]


Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/getting-started-with-wcf-and-rest-web-services/' rel='bookmark' title='Getting started with WCF and REST web services'>Getting started with WCF and REST web services</a></li>
<li><a href='http://codeblog.shawson.co.uk/conditional-dataannotations-in-c/' rel='bookmark' title='Conditional DataAnnotations in c#'>Conditional DataAnnotations in c#</a></li>
<li><a href='http://codeblog.shawson.co.uk/web-services-debugging-with-fiddler-2/' rel='bookmark' title='Web Services Debugging with Fiddler 2'>Web Services Debugging with Fiddler 2</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>I was finding k__backingField was being appended to all my object properties when exposed via my a WCF service, in the WSDL.  The solution it turns out was simple- just had to make my class a [DataContract] and mark the properties as [DataMember].</p>
<p>via <a href="http://www.integratedwebsystems.com/2009/05/wcf-data-contracts-and-k__backingfield-property-naming/">WCF Data Contracts and “k__BackingField” Property Naming &#8211; Nathan Bridgewater</a>.</p>


<p>Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/getting-started-with-wcf-and-rest-web-services/' rel='bookmark' title='Getting started with WCF and REST web services'>Getting started with WCF and REST web services</a></li>
<li><a href='http://codeblog.shawson.co.uk/conditional-dataannotations-in-c/' rel='bookmark' title='Conditional DataAnnotations in c#'>Conditional DataAnnotations in c#</a></li>
<li><a href='http://codeblog.shawson.co.uk/web-services-debugging-with-fiddler-2/' rel='bookmark' title='Web Services Debugging with Fiddler 2'>Web Services Debugging with Fiddler 2</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://codeblog.shawson.co.uk/properties-getting-k__backingfield-appended-to-their-name-in-the-wsdl-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making your WCF Service compatible with legacy .net 1.1 applications</title>
		<link>http://codeblog.shawson.co.uk/making-your-wcf-service-compatible-with-legacy-net-1-1-applications/</link>
		<comments>http://codeblog.shawson.co.uk/making-your-wcf-service-compatible-with-legacy-net-1-1-applications/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 14:01:42 +0000</pubDate>
		<dc:creator>shawson</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[C#.net]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.shawson.co.uk/codeblog/?p=414</guid>
		<description><![CDATA[I&#8217;m building an error tracking service which all our future web project will report to, so we can track and tag all our various systems problems from one place- this is currently done with email which is a bit of a nightmare! According to Microsoft, traditional ASMX web services are now considered &#8220;Legacy technology&#8221; (!) [...]


Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/wcf-services-with-json-and-soap-endpoints/' rel='bookmark' title='WCF Services with both JSON and SOAP endpoints'>WCF Services with both JSON and SOAP endpoints</a></li>
<li><a href='http://codeblog.shawson.co.uk/getting-started-with-wcf-and-rest-web-services/' rel='bookmark' title='Getting started with WCF and REST web services'>Getting started with WCF and REST web services</a></li>
<li><a href='http://codeblog.shawson.co.uk/grabbing-data-from-the-registry-on-a-remote-machine-using-dot-net-and-wmi/' rel='bookmark' title='Grabbing data from the registry on a remote machine using dot net and WMI'>Grabbing data from the registry on a remote machine using dot net and WMI</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m building an error tracking service which all our future web project will report to, so we can track and tag all our various systems problems from one place- this is currently done with email which is a bit of a nightmare!</p>
<p>According to Microsoft, traditional ASMX web services are now considered &#8220;Legacy technology&#8221; (!) so I thought I would buite the bullet and build the new services using WCF.</p>
<p>This was fairly painless until I tried to consume the web service in some old .net 1.1 web apps- when trying to add the web reference I received this error message;</p>
<blockquote><p>Web ReferenceslocalhostReference.map(1): Custom tool warning: DiscoCodeGenerator unable to initialize code generator.  No code generated.</p></blockquote>
<p>I found a great article over on the MSDN &#8211; and all it takes is a small change to the web.config, fiddling with, <a href="http://www.shawson.co.uk/codeblog/the-provided-uri-scheme-http-is-invalid-expected-https/">my old friend</a>, the httpBindings.</p>
<p>I had to swap out the default bindings put in by .net;</p>
<pre class="brush: xml">
        &lt;endpoint address=&quot;&quot; binding=&quot;wsHttpBinding&quot; contract=&quot;HachetteErrorTracker.IErrorLog&quot;&gt;
					&lt;identity&gt;
						&lt;dns value=&quot;localhost&quot;/&gt;
					&lt;/identity&gt;
				&lt;/endpoint&gt;
</pre>
<p>For this one;</p>
<pre class="brush: xml">
&lt;endpoint
           address=&quot;&quot;
           binding=&quot;basicHttpBinding&quot; bindingNamespace=&quot;http://errortracker.localhost/&quot;
           contract=&quot;HachetteErrorTracker.IErrorLog&quot;
        /&gt;
</pre>
<p><a href="http://msdn.microsoft.com/en-us/library/ms731134.aspx">How to: Configure WCF Service to Interoperate with ASP.NET Web Service Clients</a>.</p>


<p>Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/wcf-services-with-json-and-soap-endpoints/' rel='bookmark' title='WCF Services with both JSON and SOAP endpoints'>WCF Services with both JSON and SOAP endpoints</a></li>
<li><a href='http://codeblog.shawson.co.uk/getting-started-with-wcf-and-rest-web-services/' rel='bookmark' title='Getting started with WCF and REST web services'>Getting started with WCF and REST web services</a></li>
<li><a href='http://codeblog.shawson.co.uk/grabbing-data-from-the-registry-on-a-remote-machine-using-dot-net-and-wmi/' rel='bookmark' title='Grabbing data from the registry on a remote machine using dot net and WMI'>Grabbing data from the registry on a remote machine using dot net and WMI</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://codeblog.shawson.co.uk/making-your-wcf-service-compatible-with-legacy-net-1-1-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

