<?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>Jonathan C Dickinson &#187; SSRS</title>
	<atom:link href="http://jonathan.dickinsons.co.za/blog/category/programming/ssrs/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathan.dickinsons.co.za/blog</link>
	<description>&#34;Jonathan Chayce Dickinson&#34;.ToString()</description>
	<lastBuildDate>Sun, 06 Jun 2010 11:07:31 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SSRS Timeout on SSL 443 &#8211; Resolved</title>
		<link>http://jonathan.dickinsons.co.za/blog/2009/10/ssrs-timeout-on-ssl-443-resolved/</link>
		<comments>http://jonathan.dickinsons.co.za/blog/2009/10/ssrs-timeout-on-ssl-443-resolved/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 16:32:45 +0000</pubDate>
		<dc:creator>Jonathan Dickinson</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[SSRS]]></category>

		<guid isPermaLink="false">http://jonathan.dickinsons.co.za/blog/?p=161</guid>
		<description><![CDATA[If you are getting either a 'The underlying connection was closed' or 'The operation has timed-out' error when deploying reports manually (add reference to web service) to SSRS via SSL on port 443 this fix may work for you.]]></description>
			<content:encoded><![CDATA[<h2>Manifestation of the Error</h2>
<p>If you attempt to connect to SSRS via the deployment webservice; when SSRS is running in SSL mode (specifically on port 443), you may get one of the following exceptions (which <strong>do not</strong> occur intermittently):</p>
<ul>
<li>The underlying connection was closed: An unexpected error occurred on a send.</li>
<li>The operation has timed-out.</li>
</ul>
<p>You might get it for other &#8220;The underlying connection was closed&#8221; errors, but I have not confirmed that. The issue occurs mainly when you try to upload report definitions that are over approximately 100kb.</p>
<h2>The Solution</h2>
<p>Let me tell you straight up &#8211; there is no reason to disable SSL or alter timeouts. The first thing you want to do is to add a new class to your project; I called mine SslReportService. Implement ReportingService2005 from your WebService reference. You can then override GetWebRequest(Uri) without worrying about your changes being lost of you update your web reference.</p>
<p>Then, in a nutshell:</p>
<pre class="brush: csharp;">class SslReportService : ReportService.ReportingService2005
{
  protected override System.Net.WebRequest GetWebRequest(Uri uri)
  {
    var res = (HttpWebRequest)base.GetWebRequest(uri);
    res.SendChunked = true;
    return res;
  }
}</pre>
<p>Your mileage may vary; so if this turns up nothing <a href="http://blogs.msdn.com/engelsr/articles/497902.aspx">Engels Rajangam</a> has another helpful post on this issue. You might want to read up on this property on <a href="http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.sendchunked.aspx">MSDN</a> and <a href="http://www.wintellect.com/CS/blogs/jeffreyr/archive/2009/02/08/httpwebrequest-its-request-stream-and-sending-data-in-chunks.aspx">a pretty good blog post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jonathan.dickinsons.co.za/blog/2009/10/ssrs-timeout-on-ssl-443-resolved/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
