rstracer Wiki & Documentation Rss Feedhttp://www.codeplex.com/rstracer/Wiki/View.aspx?title=Homerstracer Wiki Rss DescriptionUpdated Wiki: Homehttp://www.codeplex.com/rstracer/Wiki/View.aspx?title=Home&version=12<div class="wikidoc">
<h1>
Project Description
</h1>Huh, it does what? Given the sheer number of Web methods supported by Reporting Services, you might find yourself asking which web method should you choose for the management task at hand and how should you call it? At the same time, it is likely that Report Manager or Management Studio already supports some aspect of the management feature you want to implement. Wouldn't it be nice to be able to peek under the hood and see what APIs Report Manager or a custom application calls? This is exactly what the Reporting Services Tracer (RsTracer) sample was designed to handle. RsTracer intercepts the server calls and outputs them to a trace listener, such as the Microsoft DebugView for Windows. RsTracer helps you see the APIs that a Reporting Services client invokes and what arguments it passes to each interface. It also intercepts the server response. Armed with this information, you can easily reproduce the same feature in your custom management application. You can use RsTracer with SSRS 2000, 2005, and 2008.<br /> <br /><h2>
Installing RsTracer
</h2>RsTracer is implemented as an ASP.NET HttpModule that plugs into the Reporting Services request/response pipeline. Installing RsTracer requires changing several configuraiton files:<br />1. Unzip RsTracer.zip, open the RsTracer solution in Visual Studio and build the project.<br />2. Copy the RsTracer.dll and RsTracer.pdb files to the report server binary folder. The default report server binary folder is Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin.<br />3. Open the report server web.config file in your favorite editor and add RsTracer to the list of the registered HTTP modules, as follows:<br /> <br /><pre>
&lt;httpModules&gt;
&lt;clear /&gt;
&lt;add name=&quot;RsHttpModule&quot; type=&quot;RsTracer.RsHttpModule, RsTracer&quot;/&gt;
&lt;add name=&quot;OutputCache&quot; type=&quot;System.Web.Caching.OutputCacheModule&quot;/&gt;
. . .
&lt;/httpModules&gt;
</pre> <br />4. Open the report server policy file (rssrvpolicy.config), whose default location is Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer and increase the security permissions of the RsTracer module by adding the following XML fragment after the last CodeGroup element.<br /> <br /><pre>
&lt;CodeGroup class=&quot;UnionCodeGroup&quot; version=&quot;1&quot; Name=&quot;SecurityExtensionCodeGroup&quot;
Description=&quot;Code group for the RsTracer HTTP Module&quot;
PermissionSetName=&quot;FullTrust&quot;&gt;
&lt;IMembershipCondition class=&quot;UrlMembershipCondition&quot; version=&quot;1&quot;
Url=&quot;C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin\RsTracer.dll&quot;/&gt;
&lt;/CodeGroup&gt;
</pre> <br />5. Optionally, if you want to see the report server system output and you target Reporting Services 2008 be aware that it is configured <u>not</u> to output debug messages. To change this, open the ReportingServicesService.exe.config, whose default location is Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin, and add the debugwindow switch to the TraceListeners line as follows:<br /> <br /><pre>
&lt;RStrace&gt;
&lt;add name=&quot;FileName&quot; value=&quot;ReportServerService_&quot; /&gt;
&lt;add name=&quot;FileSizeLimitMb&quot; value=&quot;32&quot; /&gt;
&lt;add name=&quot;KeepFilesForDays&quot; value=&quot;14&quot; /&gt;
&lt;add name=&quot;Prefix&quot; value=&quot;appdomain, tid, time&quot; /&gt;
&lt;add name=&quot;TraceListeners&quot; value=&quot;debugwindow,file&quot; /&gt;
&lt;add name=&quot;TraceFileMode&quot; value=&quot;unique&quot; /&gt;
&lt;add name=&quot;Components&quot; value=&quot;all:3&quot; /&gt;
&lt;/RStrace&gt;
</pre> <br />At this point, RsTracer is registered with the report server and you can start using it.<br /> <br /><h2>
Using RsTracer
</h2>Suppose you want to write a custom application to programmatically retrieve the content of a Reporting Services folder. Let's say you don't know which management API updates parameter default values, but you do know that Report Manager has the same feature. Let's see how RsRTracer can help.<br />1. Download and install Microsoft DebugView for Windows <a href="http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx" class="externalLink">http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx<span class="externalLinkIcon"></span></a>.<br />2. Run DebugView. To see only the RsTracer trace, click the Filter toolbar button and set up a filter that includes only the RsTracer messages. For example, enter RsTracer*<br />3. Open Report Manager and navigate to the desired forlder, such as Adventure Works 2008 Sample Reports folder assuming you have installed the Reporting Services sample reports. As you interact with Report Manager, you should see many calls to the report server. You can click the DebugView Clear toolbar button to clear the trace or toggle the Capture button to pause and resume the trace.<br />4. Click the Clear toolbar button (or press Ctrl-X) to clear the trace.<br />5. Click the folder link in Report Manager. <br /> <br /><img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=rstracer&amp;DownloadId=59558" alt="rstracer.png" /><br /> <br />At this point, DebugView should intercept a few method calls, such as ListSecureMethods, GetPermissions, and so on, as shown in the screenshot. Because you are retrieving report content, you deduce that you need a Get or List method. Further down the list you see a ListChildren method that looks promising (line 15). If you hover on the line below it (line 16), you will see the actual SOAP payload including method arguments. You can select the line and press Ctrl-C to copy and Ctrl-V to paste it in Notepad to examine the content more conviently. Each message has a correlation identifier that helps correlate the client request with the server response. For example, line 18 represents the server response to the ListChildren call because it has the same identifier (76). Again, you can copy the line content in Notepad to examine it further.<br />
</div>tlachevTue, 24 Feb 2009 19:11:57 GMTUpdated Wiki: Home 20090224071157PUpdated Wiki: Homehttp://www.codeplex.com/rstracer/Wiki/View.aspx?title=Home&version=11<div class="wikidoc">
<h1>
Project Description
</h1>Huh, it does what? Given the sheer number of Web methods supported by Reporting Services, you might find yourself asking which web method should you choose for the management task at hand and how should you call it? At the same time, it is likely that Report Manager or Management Studio already supports some aspect of the management feature you want to implement. Wouldn't it be nice to be able to peek under the hood and see what APIs Report Manager or a custom application calls? This is exactly what the Reporting Services Tracer (RsTracer) sample was designed to handle. RsTracer intercepts the server calls and outputs them to a trace listener, such as the Microsoft DebugView for Windows. RsTracer helps you see the APIs that a Reporting Services client invokes and what arguments it passes to each interface. It also intercepts the server response. Armed with this information, you can easily reproduce the same feature in your custom management application. You can use RsTracer with SSRS 2000, 2005, and 2008.<br /> <br /><h2>
Installing RsTracer
</h2>Installing RsRequestViewer requires changing several configuraiton files:<br />1. Unzip RsTracer.zip, open the RsTracer solution in Visual Studio and build the project.<br />2. Copy the RsTracer.dll and RsTracer.pdb files to the report server binary folder. The default report server binary folder is Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin.<br />3. Open the report server web.config file in your favorite editor and add RsTracer to the list of the registered HTTP modules, as follows:<br /> <br /><pre>
&lt;httpModules&gt;
&lt;clear /&gt;
&lt;add name=&quot;RsHttpModule&quot; type=&quot;RsTracer.RsHttpModule, RsTracer&quot;/&gt;
&lt;add name=&quot;OutputCache&quot; type=&quot;System.Web.Caching.OutputCacheModule&quot;/&gt;
. . .
&lt;/httpModules&gt;
</pre> <br />4. Open the report server policy file (rssrvpolicy.config), whose default location is Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer and increase the security permissions of the RsTracer module by adding the following XML fragment after the last CodeGroup element.<br /> <br /><pre>
&lt;CodeGroup class=&quot;UnionCodeGroup&quot; version=&quot;1&quot; Name=&quot;SecurityExtensionCodeGroup&quot;
Description=&quot;Code group for the RsTracer HTTP Module&quot;
PermissionSetName=&quot;FullTrust&quot;&gt;
&lt;IMembershipCondition class=&quot;UrlMembershipCondition&quot; version=&quot;1&quot;
Url=&quot;C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin\RsTracer.dll&quot;/&gt;
&lt;/CodeGroup&gt;
</pre> <br />5. Optionally, if you want to see the report server system output and you target Reporting Services 2008 be aware that it is configured <u>not</u> to output debug messages. To change this, open the ReportingServicesService.exe.config, whose default location is Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin, and add the debugwindow switch to the TraceListeners line as follows:<br /> <br /><pre>
&lt;RStrace&gt;
&lt;add name=&quot;FileName&quot; value=&quot;ReportServerService_&quot; /&gt;
&lt;add name=&quot;FileSizeLimitMb&quot; value=&quot;32&quot; /&gt;
&lt;add name=&quot;KeepFilesForDays&quot; value=&quot;14&quot; /&gt;
&lt;add name=&quot;Prefix&quot; value=&quot;appdomain, tid, time&quot; /&gt;
&lt;add name=&quot;TraceListeners&quot; value=&quot;debugwindow,file&quot; /&gt;
&lt;add name=&quot;TraceFileMode&quot; value=&quot;unique&quot; /&gt;
&lt;add name=&quot;Components&quot; value=&quot;all:3&quot; /&gt;
&lt;/RStrace&gt;
</pre> <br />At this point, RsTracer is registered with the report server and you can start using it.<br /> <br /><h2>
Using RsTracer
</h2>Suppose you want to write a custom application to programmatically retrieve the content of a Reporting Services folder. Let's say you don't know which management API updates parameter default values, but you do know that Report Manager has the same feature. Let's see how RsRTracer can help.<br />1. Download and install Microsoft DebugView for Windows <a href="http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx" class="externalLink">http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx<span class="externalLinkIcon"></span></a>.<br />2. Run DebugView. To see only the RsTracer trace, click the Filter toolbar button and set up a filter that includes only the RsTracer messages. For example, enter RsTracer*<br />3. Open Report Manager and navigate to the desired forlder, such as Adventure Works 2008 Sample Reports folder assuming you have installed the Reporting Services sample reports. As you interact with Report Manager, you should see many calls to the report server. You can click the DebugView Clear toolbar button to clear the trace or toggle the Capture button to pause and resume the trace.<br />4. Click the Clear toolbar button (or press Ctrl-X) to clear the trace.<br />5. Click the folder link in Report Manager. <br /> <br /><img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=rstracer&amp;DownloadId=59558" alt="rstracer.png" /><br /> <br />At this point, DebugView should intercept a few method calls, such as ListSecureMethods, GetPermissions, and so on, as shown in the screenshot. Because you are retrieving report content, you deduce that you need a Get or List method. Further down the list you see a ListChildren method that looks promising (line 15). If you hover on the line below it (line 16), you will see the actual SOAP payload including method arguments. You can select the line and press Ctrl-C to copy and Ctrl-V to paste it in Notepad to examine the content more conviently. Each message has a correlation identifier that helps correlate the client request with the server response. For example, line 18 represents the server response to the ListChildren call because it has the same identifier (76). Again, you can copy the line content in Notepad to examine it further.<br />
</div>tlachevTue, 24 Feb 2009 02:36:36 GMTUpdated Wiki: Home 20090224023636A