<?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; debugging</title>
	<atom:link href="http://elegantcode.com/tag/debugging/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>
		<item>
		<title>Debugging XAML</title>
	<atom:link href="http://elegantcode.com/tag/debugging/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; debugging</title>
	<atom:link href="http://elegantcode.com/tag/debugging/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>
		<item>
		<title>Debugging XAML</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>
		<item>
		<title>Elegant Code &#187; debugging</title>
	<atom:link href="http://elegantcode.com/tag/debugging/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>
		<item>
		<title>Debugging XAML</title>
		<link>http://elegantcode.com/2009/04/14/debugging-xaml/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=debugging-xaml</link>
		<comments>http://elegantcode.com/2009/04/14/debugging-xaml/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 01:43:01 +0000</pubDate>
		<dc:creator>Brian Lagunas</dc:creator>
				<category><![CDATA[WPF]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2009/04/14/debugging-xaml/</guid>
		<description><![CDATA[Okay, so I have been asked this question more than almost any XAML related question in the past few weeks; How do I debug XAML?&#160; The problem with XAML’s powerful binding model is that it can be difficult to debug errors in your binding paths. Lets say I have the following code snippet: &#60;StatusBar&#62; &#60;StatusBarItem&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, so I have been asked this question more than almost any XAML related question in the past few weeks; How do I debug XAML?&#160; The problem with XAML’s powerful binding model is that it can be difficult to debug errors in your binding paths.</p>  <p>Lets say I have the following code snippet:</p>  <div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">   <div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">     <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #0000ff">&lt;</span><span style="color: #800000">StatusBar</span><span style="color: #0000ff">&gt;</span></pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">   <span style="color: #0000ff">&lt;</span><span style="color: #800000">StatusBarItem</span><span style="color: #0000ff">&gt;</span></pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">       <span style="color: #0000ff">&lt;</span><span style="color: #800000">TextBlock</span> <span style="color: #ff0000">Text</span><span style="color: #0000ff">=&quot;{Binding Messssage}&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">   <span style="color: #0000ff">&lt;/</span><span style="color: #800000">StatusBarItem</span><span style="color: #0000ff">&gt;</span></pre>

    <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #0000ff">&lt;/</span><span style="color: #800000">StatusBar</span><span style="color: #0000ff">&gt;</span></pre>
  </div>
</div>

<p></p>

<p>As you can see my property Message is totally misspelled.&#160; If I were to run this application nothing would ever appear in my status bar, and I would not know why.&#160; I didn’t get any compile errors, and my view renders perfectly in my designer, so what the hell is going on.&#160; You might spend hours looking at your object’s property, stepping through the property changed events, or just saying XAML is a piece of crap and I give up.&#160; Well never fear, I am about to reveal the secret to debugging your XAML.</p>

<p>Look in your Output Window!</p>

<p><a href="http://elegantcode.com/wp-content/uploads/2009/04/outputwindow.jpg" target="_blank"><img title="OutputWindow" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="79" alt="OutputWindow" src="http://elegantcode.com/wp-content/uploads/2009/04/outputwindow-thumb.jpg" width="404" border="0" /></a> </p>

<p>Yes, the nearly always forgotten Output Window.&#160; As you can see, if you click on the image above, it tells me that I have a binding expression path error and gives the line number where the error occurred.&#160; So don’t spend hours stepping through code looking for a ghost.&#160; Just check your Output Window.</p>]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2009/04/14/debugging-xaml/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

