SSRS Timeout on SSL 443 – Resolved

Manifestation of the Error

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 do not occur intermittently):

  • The underlying connection was closed: An unexpected error occurred on a send.
  • The operation has timed-out.

You might get it for other “The underlying connection was closed” errors, but I have not confirmed that. The issue occurs mainly when you try to upload report definitions that are over approximately 100kb.

The Solution

Let me tell you straight up – 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.

Then, in a nutshell:

class SslReportService : ReportService.ReportingService2005
{
  protected override System.Net.WebRequest GetWebRequest(Uri uri)
  {
    var res = (HttpWebRequest)base.GetWebRequest(uri);
    res.SendChunked = true;
    return res;
  }
}

Your mileage may vary; so if this turns up nothing Engels Rajangam has another helpful post on this issue. You might want to read up on this property on MSDN and a pretty good blog post.

This entry was posted in C#, Programming, SSRS. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

2 Comments

  1. Gary Brunton
    Posted February 8, 2010 at 9:57 pm | Permalink

    Your solution worked perfect for me. Thank’s so much for your post.

    I had spent a significant amount of time on this issue and am glad to not have to revert back to using a non ssl connection.

  2. Posted February 9, 2010 at 9:36 am | Permalink

    Glad it helped!

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>