<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: How to provide custom JSON exceptions from a WCF service</title>
	<atom:link href="http://blog.manglar.com/how-to-provide-custom-json-exceptions-from-as-wcf-service/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.manglar.com/how-to-provide-custom-json-exceptions-from-as-wcf-service/</link>
	<description>{ideas}</description>
	<lastBuildDate>Wed, 16 Nov 2011 15:15:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
	<item>
		<title>By: Jaime</title>
		<link>http://blog.manglar.com/how-to-provide-custom-json-exceptions-from-as-wcf-service/#comment-51</link>
		<dc:creator>Jaime</dc:creator>
		<pubDate>Tue, 08 Nov 2011 17:31:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.manglar.com/?p=86#comment-51</guid>
		<description>In the latest version of WCF (As of 11/2011) there&#039;s a better way of doing this using WebFaultException. You can use it as follows in your service catch blocks:

 throw new WebFaultException(new ServiceErrorDetail(ex), HttpStatusCode.SeeOther);</description>
		<content:encoded><![CDATA[<p>In the latest version of WCF (As of 11/2011) there&#8217;s a better way of doing this using WebFaultException. You can use it as follows in your service catch blocks:</p>
<p> throw new WebFaultException(new ServiceErrorDetail(ex), HttpStatusCode.SeeOther);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Germán Medina</title>
		<link>http://blog.manglar.com/how-to-provide-custom-json-exceptions-from-as-wcf-service/#comment-7</link>
		<dc:creator>Germán Medina</dc:creator>
		<pubDate>Tue, 15 Jun 2010 01:12:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.manglar.com/?p=86#comment-7</guid>
		<description>I really don&#039;t know exactly what your problem is. For SSL scenarios I change my CreateService host method and everything works well.
[sourcecode language=&quot;csharp&quot;]
protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)
        {
            ServiceHost host = new ServiceHost(typeof(Services), baseAddresses);
            host.Authorization.PrincipalPermissionMode = PrincipalPermissionMode.None;
            ServiceEndpoint endpoint = host.AddServiceEndpoint(typeof(IServices), new WebHttpBinding(WebHttpSecurityMode.Transport), &quot;&quot;);
            endpoint.Behaviors.Add(new WebHttpBehaviorEx());
            return host;
        }
[/sourcecode]</description>
		<content:encoded><![CDATA[<p>I really don&#8217;t know exactly what your problem is. For SSL scenarios I change my CreateService host method and everything works well.</p>
<pre class="brush: csharp; title: ;">
protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)
        {
            ServiceHost host = new ServiceHost(typeof(Services), baseAddresses);
            host.Authorization.PrincipalPermissionMode = PrincipalPermissionMode.None;
            ServiceEndpoint endpoint = host.AddServiceEndpoint(typeof(IServices), new WebHttpBinding(WebHttpSecurityMode.Transport), &quot;&quot;);
            endpoint.Behaviors.Add(new WebHttpBehaviorEx());
            return host;
        }
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Patrick</title>
		<link>http://blog.manglar.com/how-to-provide-custom-json-exceptions-from-as-wcf-service/#comment-6</link>
		<dc:creator>Brian Patrick</dc:creator>
		<pubDate>Wed, 09 Jun 2010 18:43:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.manglar.com/?p=86#comment-6</guid>
		<description>This solutions is correct and does work fine for non SSL (http) endpoints.  However, as I&#039;ve just found out, when we moved over to SSL endpoints (https), this solution fails.  For some reason, the AddServerErrorHandlers() never gets called after calling WebServiceHost.Open().  Does anyone have any further information on how to get this work with WebServiceHost over SSL?  Thanks!</description>
		<content:encoded><![CDATA[<p>This solutions is correct and does work fine for non SSL (http) endpoints.  However, as I&#8217;ve just found out, when we moved over to SSL endpoints (https), this solution fails.  For some reason, the AddServerErrorHandlers() never gets called after calling WebServiceHost.Open().  Does anyone have any further information on how to get this work with WebServiceHost over SSL?  Thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

