<?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>Elegant Code &#187; SQL Server Reporting Services</title>
	<atom:link href="http://elegantcode.com/tag/sql-server-reporting-services/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com</link>
	<description></description>
	<lastBuildDate>Tue, 15 May 2012 10:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Calls to ReportExecutionService.Render() Hang</title>
	<atom:link href="http://elegantcode.com/tag/sql-server-reporting-services/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com</link>
	<description></description>
	<lastBuildDate>Tue, 15 May 2012 10:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Elegant Code &#187; SQL Server Reporting Services</title>
	<atom:link href="http://elegantcode.com/tag/sql-server-reporting-services/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com</link>
	<description></description>
	<lastBuildDate>Tue, 15 May 2012 10:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Calls to ReportExecutionService.Render() Hang</title>
		<link>http://elegantcode.com/2010/01/25/calls-to-reportexecutionservice-render-hang/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=calls-to-reportexecutionservice-render-hang</link>
		<comments>http://elegantcode.com/2010/01/25/calls-to-reportexecutionservice-render-hang/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 23:27:44 +0000</pubDate>
		<dc:creator>Tony Rasa</dc:creator>
				<category><![CDATA[Esoterica]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[SQL Server Reporting Services]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2010/01/25/calls-to-reportexecutionservice-render-hang/</guid>
		<description><![CDATA[Given: One Windows Service, written in C#, using SQL Reporting Services via the SSRS web services.&#160; MyApp.Service waits for work requests to come in, and when it finds them it uses SSRS to generate some PDFs (among a bunch of other stuff).&#160; The Windows Service code is in one project, “myapp.service,” and the code that [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Given</strong>: One Windows Service, written in C#, using SQL Reporting Services via the SSRS web services.&#160; MyApp.Service waits for work requests to come in, and when it finds them it uses SSRS to generate some PDFs (among a bunch of other stuff).&#160; The Windows Service code is in one project, “myapp.service,” and the code that does all the work is in a shared project, “myapp.core.”.&#160; </p>  <p><strong>Problem:</strong> The raw bytes of the PDF are returned from SSRS by using the class Microsoft.SqlServer.ReportingServices2005.Execution.ReportExecutionService, via the Render() method.&#160; This code works just fine in Dev, Test, and Stage environments – but in Production, without fail, this Render() method hangs and will never return back to the service process.</p>  <p><strong>The Fix:</strong>&#160; This functionality is a small bit in a much larger application, and even the PDF generation is a smallish piece of some larger responsibilities for the service.&#160; So first, I want to isolate the behavior, and then duplicate it.&#160; </p>  <p>I wrote a test windows service consisting of one project, that does one thing: when a timer fires, a hardcoded request to the production Reporting Services is made to get a PDF bytestream.&#160; This service does what is expected in Dev and Stage, but when I tried to install it on Production:</p>  <p><font face="Courier New">An exception occurred while trying to find the installers in the C:\webreader\webreader.svc.exe assembly.      <br />System.Reflection.<strong>ReflectionTypeLoadException</strong>: <strong>Unable to load one or more of the requested types.</strong> Retrieve the LoaderExceptions property for more information.       <br />Aborting installation for C:\webreader\webreader.svc.exe.</font></p>  <p>Can’t load a type?!&#160; So I copy Microsoft.ReportViewer.Common.dll and Microsoft.ReportViewer.WebForms.dll into the program directory, and my test service installs and works perfectly.&#160; Copying the same files into the production service’s directory also fixes the problem.</p>  <p>&#160;</p>  <p>So, if your Reporting Services ASMX calls are hanging, try changing your references over to “Copy Local” and see what happens…</p>  <p>&#160;</p>  <p><strong>Why this is weird:</strong> If those DLLs were missing or corrupt, then why did the original App code load and run (and hang)?&#160; I thought perhaps the wrong version was referenced in the GAC, but no there were NO Microsoft.ReportViewer.*.dll’s registered.&#160; The service installer caught the missing types when the references were all in one assembly, but didn’t have any problems when the references were spread into a 2nd assembly.&#160; </p>  <p>Just when I think “hey, maybe I’m getting a hang of this .NET stuff” a problem like this happens…</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2010/01/25/calls-to-reportexecutionservice-render-hang/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

