<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4909501580525837098</id><updated>2011-11-27T16:28:49.876-08:00</updated><category term='ReportViewerWebPart'/><category term='customaction'/><category term='listviewwebpart'/><category term='application.master'/><category term='{listid}'/><category term='CSS'/><category term='bug'/><category term='actionurl'/><category term='Styling'/><category term='Customise'/><category term='fix'/><category term='Theme'/><category term='Reporting Services'/><category term='rsItemNotFound'/><category term='{itemid}'/><category term='SPLongOperation'/><title type='text'>Stephen Kaye's SharePoint 2007 (MOSS)</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://stephenkaye.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4909501580525837098/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://stephenkaye.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Stephen K</name><uri>http://www.blogger.com/profile/02829592208885854213</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://profile.ak.facebook.com/profile5/1022/15/t581873335_131.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4909501580525837098.post-8511170387034867000</id><published>2008-07-17T05:13:00.001-07:00</published><updated>2008-12-11T18:19:09.629-08:00</updated><title type='text'>Master the order of WebConfigModifications</title><content type='html'>There are plenty of blogs describing WebConfigModifications so I'm just going to stress what I feel are the two most important properties on the WebConfigModifications class.&lt;br /&gt;&lt;br /&gt;The name and the path.&lt;br /&gt;&lt;br /&gt;There are plenty of descriptions of these properties but the most important thing to note is that when combined they form the xpath used to locate the node on which to operate.&lt;br /&gt;&lt;br /&gt;Therefore, the following 2 examples have the same effect.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_l3RISUzCBro/SH9YNQmHkMI/AAAAAAAAACA/7oP35EZxT34/s1600-h/mod1.GIF"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_l3RISUzCBro/SH9YNQmHkMI/AAAAAAAAACA/7oP35EZxT34/s400/mod1.GIF" border="0" alt=""id="BLOGGER_PHOTO_ID_5223991077589455042" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is because when the name and path attributes are combined they result in the same xpath.&lt;br /&gt;&lt;br /&gt;&lt;code style="font-size:80%;color:#000;"&gt;configuration/system.web/httpHandlers/add[@verb='*' and @path='*.asmx']&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The reason I am stressing this so much is that I've noticed lots of complaints about how the sequence attribute does not appear to affect the order in which the modifications are applied. This is because the sequence attribute is only taken into account when the names of the modfications are the same. This isn't much use. This means that if I try to insert the following lines into the web.config&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-size:80%"&gt;&amp;lt;clear /&amp;gt;&lt;br /&gt;&amp;lt;add verb="*" path="*.asmx" /&amp;gt;&lt;/pre&gt;it would always appear &lt;br /&gt;&lt;br /&gt;&lt;pre style="font-size:80%"&gt;&amp;lt;add verb="*" path="*.asmx" /&amp;gt;&lt;br /&gt;&amp;lt;clear /&amp;gt;&lt;/pre&gt;because alphabetically the names are&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-size:80%"&gt;add[verb='*' and path='*.asmx']&lt;br /&gt;clear&lt;/pre&gt;Because the names are different the sequence would be ignored and the modifications would be applied alphabetically. Therefore adds would come before clears and removes would be last.&lt;br /&gt;&lt;br /&gt;That sucks!! But help is at hand. Now that we now the name attribute just forms part of the xpath to locate the element in the web.config file we can use this to our advantage.&lt;br /&gt;&lt;br /&gt;The earlier examples formed the xpath&lt;br /&gt;&lt;br /&gt;&lt;code style="font-size:80%;color:#000;"&gt;configuration/system.web/httpHandlers/add[@verb='*' and @path='*.asmx']&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Well lets alter this example (or will we). If we add a condition to httpHandlers but make sure it always equates to true, the xpath would return the same node but the name used in the WebConfigModification construct would be slightly different.&lt;br /&gt;&lt;br /&gt;&lt;code style="font-size:80%;color:#000;"&gt;configuration/system.web/httpHandlers&lt;span style="color:#AF1515;"&gt;[1=1]&lt;/span&gt;/add[@verb='*' and @path='*.asmx']&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The condition always returns true and will be ignored but lets look at how this changes the code.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_l3RISUzCBro/SH9e0zV1BFI/AAAAAAAAACI/idwXPPcIshc/s1600-h/mod2.GIF"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_l3RISUzCBro/SH9e0zV1BFI/AAAAAAAAACI/idwXPPcIshc/s400/mod2.GIF" border="0" alt=""id="BLOGGER_PHOTO_ID_5223998354001036370" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The names are now (in alphabetic order)&lt;br /&gt;&lt;br /&gt;&lt;code style="font-size:80%;color:#000;"&gt;httpHandlers[1=1]/clear&lt;/code&gt;&lt;br /&gt;&lt;code style="font-size:80%;color:#000;"&gt;httpHandlers[2=2]/add[@verb='*' and @path='*.asmx']&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;and a therefore will be applied as wanted/expected.&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-size:80%"&gt;&amp;lt;clear /&amp;gt;&lt;br /&gt;&amp;lt;add verb="*" path="*.asmx" /&amp;gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4909501580525837098-8511170387034867000?l=stephenkaye.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stephenkaye.blogspot.com/feeds/8511170387034867000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4909501580525837098&amp;postID=8511170387034867000' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4909501580525837098/posts/default/8511170387034867000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4909501580525837098/posts/default/8511170387034867000'/><link rel='alternate' type='text/html' href='http://stephenkaye.blogspot.com/2008/07/master-webconfigmodifications.html' title='Master the order of WebConfigModifications'/><author><name>Stephen K</name><uri>http://www.blogger.com/profile/02829592208885854213</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://profile.ak.facebook.com/profile5/1022/15/t581873335_131.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_l3RISUzCBro/SH9YNQmHkMI/AAAAAAAAACA/7oP35EZxT34/s72-c/mod1.GIF' height='72' width='72'/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4909501580525837098.post-1158801804600447380</id><published>2008-03-31T14:48:00.000-07:00</published><updated>2008-12-11T18:19:09.900-08:00</updated><title type='text'>Execute entire page with elevated privileges</title><content type='html'>I recently tried to make an entire page run under elevated privileges (just to see if I could). The idea was to override the IHttpHandler ProcessRequest method, elevate the privileges and then continue running the page.&lt;br /&gt;&lt;br /&gt;This isn't something I would recommend doing. The idea came to me whilst trying to resolve a different issue with Form Digest during code executed under RunWithElevatedPrivileges. The solution to which can be found here &lt;a href="http://stephenkaye.blogspot.com/2008/03/form-digest-and-spsecurityrunwithelevat.html"&gt;Form Digest and SPSecurity.RunWithElevatedPrivileges&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;However, I did manage to elevate the privileges of the entire page and this is how I did it.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_l3RISUzCBro/R_Fj_u48SCI/AAAAAAAAAA8/Ba41VIz2ay0/s1600-h/code.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_l3RISUzCBro/R_Fj_u48SCI/AAAAAAAAAA8/Ba41VIz2ay0/s400/code.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5184034592649922594" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The ProcessRequest method implements the IHttpHandler interface and is the entry point into the page. What I discovered is that both the SPContext class and the SPControl class both depend on objects initialised in the context.Items collection.&lt;br /&gt;Elevating the privileges at this point means that the form digest control will be created in the context of the privileged account.&lt;br /&gt;&lt;br /&gt;One issue that may arise is that client script sometimes updates the FormDigest value this could potentially invalidate the digest.&lt;br /&gt;&lt;br /&gt;Leave a comment with your thoughts.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4909501580525837098-1158801804600447380?l=stephenkaye.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stephenkaye.blogspot.com/feeds/1158801804600447380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4909501580525837098&amp;postID=1158801804600447380' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4909501580525837098/posts/default/1158801804600447380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4909501580525837098/posts/default/1158801804600447380'/><link rel='alternate' type='text/html' href='http://stephenkaye.blogspot.com/2008/03/execute-entire-page-with-elevated.html' title='Execute entire page with elevated privileges'/><author><name>Stephen K</name><uri>http://www.blogger.com/profile/02829592208885854213</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://profile.ak.facebook.com/profile5/1022/15/t581873335_131.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_l3RISUzCBro/R_Fj_u48SCI/AAAAAAAAAA8/Ba41VIz2ay0/s72-c/code.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4909501580525837098.post-2511905336318818268</id><published>2008-03-31T14:30:00.000-07:00</published><updated>2008-03-31T15:39:26.679-07:00</updated><title type='text'>Form Digest and SPSecurity.RunWithElevatedPrivileges</title><content type='html'>A colleague of mine recently had an issue when running code using SPSecurity.RunWithElevatedPrivileges. The SPWeb's AllowUnsafeUpdates attribute had been set to true but an error was still occuring when calling methods that checked the FormDigest of the current page.&lt;br /&gt;&lt;br /&gt;I found an article that said the answer to this is to disable the FormDigest settings on the web application using&lt;br /&gt;&lt;br /&gt;SPSite.WebApplication.FormDigestSettings.Enabled = false&lt;br /&gt;&lt;br /&gt;This means that when the form digest is validated it will always report that it is valid. My opinion on this though is that it isn't very safe. If you're creating a page that runs code under elevated privileges the last thing you want to do is introduce the ability to bypass form digest.&lt;br /&gt;&lt;br /&gt;&lt;b style="color:green;"&gt;The Solution&lt;/b&gt;&lt;br /&gt;That was when I discovered that the form digest is only validated once per request and then a flag is set in the page's context. Therefore, if you call the ValidateFormDigest method on the SPWeb object. This can easily be done using  &lt;br /&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;SPUtility.ValidateFormDigest()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will validate the form digest and cache the result ensuring that when the ValidateFormDigest is called within the SPSecurity.RunWithElevatedPrivileges wrapper it will always validate.&lt;br /&gt;&lt;br /&gt;This solution means that FormDigest on the page will not be comprimised and the code will still run. You will still need to set AllowUnsafeUpdates to true.&lt;br /&gt;&lt;br /&gt;Also for a bit of fun I decided to see if it was possible to run the entire page under elevated privileges. I'm not sure if you'd ever want to do this but this is what I came up with. &lt;a href="http://stephenkaye.blogspot.com/2008/03/execute-entire-page-with-elevated.html"&gt;Execute entire page with elevated privileges&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4909501580525837098-2511905336318818268?l=stephenkaye.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stephenkaye.blogspot.com/feeds/2511905336318818268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4909501580525837098&amp;postID=2511905336318818268' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4909501580525837098/posts/default/2511905336318818268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4909501580525837098/posts/default/2511905336318818268'/><link rel='alternate' type='text/html' href='http://stephenkaye.blogspot.com/2008/03/form-digest-and-spsecurityrunwithelevat.html' title='Form Digest and SPSecurity.RunWithElevatedPrivileges'/><author><name>Stephen K</name><uri>http://www.blogger.com/profile/02829592208885854213</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://profile.ak.facebook.com/profile5/1022/15/t581873335_131.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4909501580525837098.post-2752360692555160487</id><published>2008-03-19T17:55:00.000-07:00</published><updated>2008-12-11T18:19:10.618-08:00</updated><title type='text'>Open Containing Folder in Search Results</title><content type='html'>I was recently asked if it was possible to display a "Open containing folder" link in search results when the returned result was a document. My initial thought was that as seen as search results are created by applying a xsl stylesheet to some xml it shouldn't be a problem. I'll just modify the xsl in the search results web part...&lt;br /&gt;&lt;br /&gt;Ah, right, ok then ...&lt;br /&gt;&lt;br /&gt;I became stuck when I tried to determine the url of the containing folder. I originally intended to call some script embeded in the xsl that would work out the url but then I discovered that the xsl transformation in a DataViewWebPart, from which the search results web parts inherits, uses XSLTSettings.Default which disables scripting.&lt;br /&gt;&lt;br /&gt;Then I got an idea. I would create a ficticious element, like the ie:menuitem elements sharepoint creates for the drop down menus, called ie:link with an attribute called url that I assign the results url to. This output is ignored by the browser but then at the end of my xsl stylesheet I render some javascript onto the page that returns all the ie:link elements and creates a link to the containing folder of the url (via a bit of string manipulation) and substitutes it back into the page.&lt;br /&gt;&lt;br /&gt;To make this link only appear when rendering documents the output of the ie:link element is rendered inside a xsl:if element that checks the isdocument element.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_l3RISUzCBro/R-HBke48R_I/AAAAAAAAAAk/ErGp0zk1nFg/s1600-h/link.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_l3RISUzCBro/R-HBke48R_I/AAAAAAAAAAk/ErGp0zk1nFg/s400/link.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5179633878964127730" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_l3RISUzCBro/SRw6jXiwL6I/AAAAAAAAACQ/W4jnAb50PVw/s1600-h/script.gif"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 263px;" src="http://4.bp.blogspot.com/_l3RISUzCBro/SRw6jXiwL6I/AAAAAAAAACQ/W4jnAb50PVw/s400/script.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5268150043406249890" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Download &lt;a href="http://steekaye.googlepages.com/SearchResultsSample.xslt"&gt;sample xsl&lt;/a&gt; for search results web part.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4909501580525837098-2752360692555160487?l=stephenkaye.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stephenkaye.blogspot.com/feeds/2752360692555160487/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4909501580525837098&amp;postID=2752360692555160487' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4909501580525837098/posts/default/2752360692555160487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4909501580525837098/posts/default/2752360692555160487'/><link rel='alternate' type='text/html' href='http://stephenkaye.blogspot.com/2008/03/open-containing-folder-in-search.html' title='Open Containing Folder in Search Results'/><author><name>Stephen K</name><uri>http://www.blogger.com/profile/02829592208885854213</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://profile.ak.facebook.com/profile5/1022/15/t581873335_131.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_l3RISUzCBro/R-HBke48R_I/AAAAAAAAAAk/ErGp0zk1nFg/s72-c/link.gif' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4909501580525837098.post-877563086904592999</id><published>2008-03-10T19:21:00.000-07:00</published><updated>2008-03-11T03:52:34.632-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Customise'/><category scheme='http://www.blogger.com/atom/ns#' term='application.master'/><title type='text'>How to customise the SharePoint application.master file</title><content type='html'>Complete with source code.&lt;br /&gt;&lt;br /&gt;So you want to customise your site. You create a master page; you even create your own theme. Just look at your perfect, beautiful site. Then you realise that every time you view a page in the layouts directory your master page is ignored.&lt;br /&gt;&lt;br /&gt;This is because all these pages use the /_layouts/application.master master page. So how does one change this setting? In short the answer is you don't. Microsoft do describe two methods for &lt;a href="http://support.microsoft.com/kb/944105"&gt;cusomising application pages in the Layouts folder&lt;/a&gt; but both are lacking. Each method has advantages and over the other but neither satisfy my requirements.&lt;br /&gt;&lt;br /&gt;I'd like to be able to &lt;br /&gt;&lt;ul&gt;&lt;li&gt;specify an alternate master page for any site (SPWeb) and have all sub-webs inherit the master page&lt;/li&gt;&lt;li&gt;configure the url to the master page via the UI&lt;/li&gt;&lt;li&gt;still use the uncustomised version of the application.master file&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;There are several components to the solution of this issue which can be download at the end of this post (including source code). &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Changing the Master Page&lt;/b&gt;&lt;br /&gt;In order to change the master page we need a way to check every page requested to see if we need to change the master page. To do this we will use a &lt;a href="http://support.microsoft.com/kb/307996"&gt;HttpModule&lt;/a&gt;. This will allow us to inspect the page being requested and if required attach an event to modify the master page.&lt;br /&gt;&lt;br /&gt;The HttpModule will get the page handler and check the MasterPageFile property to see if it is set to the application.master. If it is, it will check the current web's property bag to see if an alternate master page has been specified. If no alternative is set, it will check the parent webs and inherit the setting. If an alternate is found an event handler will be attached to the page's init event that will then change the master page.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Configuring the Master Page&lt;/b&gt;&lt;br /&gt;A custom action will be used to create a link in the Site Administration section of the site settings page. This will load a new application page that allows a site admin to set the alternate url for the master page that will be stored in the current web's property bag.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Sticking it all together&lt;/b&gt;&lt;br /&gt;Nobody likes fixes that require manual changes to the file system and to the web.config files, so the aim is to create a single web application feature the can be installed, deployed and activated. The HttpModule requires modifications to the web.config file, this will be handled via a &lt;a href="http://msdn2.microsoft.com/en-us/magazine/cc163428.aspx"&gt;feature receiver&lt;/a&gt; that applies the &lt;a href="http://msdn2.microsoft.com/en-us/library/bb861909.aspx?ref=ZindeShop.Com"&gt;web config modifications&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The feature will also install the application page that allows the site administrator to modify the URL to the alternate master page and add a link to the page into site settings under the Site Administration section.&lt;br /&gt;&lt;br /&gt;To try this solution download the SharePoint solution file and install and deploy it on your farm. In Central Administration go to Manage Web Application Features and activate the Application Master Page feature on the required web application. After doing this if you go to the site settings page of any site on the web application you will see an Application Master Page link. Change the url to the location of your new master page.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Finally the Master Page&lt;/b&gt;&lt;br /&gt;To test this solution you may wish to simply copy the application.master and make a small alteration so that you can see the difference. My recommendation for a full solution would be to create master pages using the application.master file as a template and deploy them to the layouts folder as part of your solution.&lt;br /&gt;&lt;br /&gt;Download the solution here &lt;a href="http://steekaye.googlepages.com/seed.hf2.wsp"&gt;seed.hf2.wsp&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Download the source code here &lt;a href="http://steekaye.googlepages.com/seed.hf2.zip"&gt;seed.hf2.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Please leave a comment if you found this post helpful or if you have any suggestions on how to improve it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4909501580525837098-877563086904592999?l=stephenkaye.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stephenkaye.blogspot.com/feeds/877563086904592999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4909501580525837098&amp;postID=877563086904592999' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4909501580525837098/posts/default/877563086904592999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4909501580525837098/posts/default/877563086904592999'/><link rel='alternate' type='text/html' href='http://stephenkaye.blogspot.com/2008/03/how-to-customise-applicationmaster-file.html' title='How to customise the SharePoint application.master file'/><author><name>Stephen K</name><uri>http://www.blogger.com/profile/02829592208885854213</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://profile.ak.facebook.com/profile5/1022/15/t581873335_131.jpg'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4909501580525837098.post-6927829730422641358</id><published>2008-02-19T14:54:00.000-08:00</published><updated>2010-08-16T07:41:56.278-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='{itemid}'/><category scheme='http://www.blogger.com/atom/ns#' term='actionurl'/><category scheme='http://www.blogger.com/atom/ns#' term='listviewwebpart'/><category scheme='http://www.blogger.com/atom/ns#' term='bug'/><category scheme='http://www.blogger.com/atom/ns#' term='{listid}'/><category scheme='http://www.blogger.com/atom/ns#' term='fix'/><category scheme='http://www.blogger.com/atom/ns#' term='customaction'/><title type='text'>Fix For Bug With CustomAction (with source code)</title><content type='html'>I recently overheard a colleague discussing an issue with using CustomAction elements to extend the UI in MOSS, details of his issue can be read here.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://chrissyblanco.blogspot.com/2007/12/bug-with-customaction-in-actions-menu.html"&gt;http://chrissyblanco.blogspot.com/2007/12/bug-with-customaction-in-actions-menu.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To sum up, if you define a CustomAction as part of a feature and use tokens in the URL e.g. &amp;lt;UrlAction Url="~site/Test.aspx?List={ListId}"/&amp;gt;, the custom action will work fine in a document library. However, if you add a web part representing the same document library to another page the tokens in the url do not get replaced. This is a very irratating bug.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The fix.&lt;/b&gt;&lt;br /&gt;The only way I could see to fix this, was to replace the tokens using javascript. The menu options are available from the dom and the webpart also creates a context object in javascript to represent the displayed list.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The challenge.&lt;/b&gt;&lt;br /&gt;To fix every occurance in a web app.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The idea.&lt;/b&gt;&lt;br /&gt;Control Adapters. I simple idea but it presented a few difficulties to get this working in SharePoint.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The solution.&lt;/b&gt;&lt;br /&gt;The SharePoint solution contains a WebApplication feature that when activated submits a JobDefinition to modify the compat.browser file already provisioned in the web app. The modification is a single control adapter entry to render all listviewwebparts using my control adapter.&lt;br /&gt;&lt;br /&gt;The control adapter then allows the listviewwebpart to render as normal and then renders some javascript afterwards that fixes the rendered listviewwebpart.&lt;br /&gt;&lt;br /&gt;Download the solution here &lt;a href="https://sites.google.com/site/steekaye/Seed.HF1.wsp"&gt;seed.hf1.wsp&lt;/a&gt;. After installing and deploying the solution, run &lt;br /&gt;&lt;br /&gt;stsadm -o activatefeature -name seed.hf1 -url &amp;lt;target url&amp;gt;&lt;br /&gt;&lt;br /&gt;Download the source code here &lt;a href="https://sites.google.com/site/steekaye/Seed.HF1.zip"&gt;seed.hf1.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;More&lt;/b&gt;&lt;br /&gt;I am planning to blog in more detail about the techniques used in this solution, but I want to break them down into a small series of more detailed blogs. In the meantime, have a look through my source code and please leave any question or comments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4909501580525837098-6927829730422641358?l=stephenkaye.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stephenkaye.blogspot.com/feeds/6927829730422641358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4909501580525837098&amp;postID=6927829730422641358' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4909501580525837098/posts/default/6927829730422641358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4909501580525837098/posts/default/6927829730422641358'/><link rel='alternate' type='text/html' href='http://stephenkaye.blogspot.com/2008/02/bug-with-customactions.html' title='Fix For Bug With CustomAction (with source code)'/><author><name>Stephen K</name><uri>http://www.blogger.com/profile/02829592208885854213</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://profile.ak.facebook.com/profile5/1022/15/t581873335_131.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4909501580525837098.post-2705047894964290687</id><published>2007-11-30T07:41:00.001-08:00</published><updated>2008-02-20T15:20:50.631-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SPLongOperation'/><category scheme='http://www.blogger.com/atom/ns#' term='Styling'/><category scheme='http://www.blogger.com/atom/ns#' term='CSS'/><category scheme='http://www.blogger.com/atom/ns#' term='Theme'/><title type='text'>Applying a theme to SPLongOperation</title><content type='html'>At some point in SharePoint development you'll probably write some code that takes a long time to execute and you'll run into this fella, the &lt;a target="_blank" alt="View SPLongOperation documentation in a new window" href="http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.splongoperation.aspx"&gt;SPLongOperation&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Unfortunately though, you may feel let down when you run your code and the page displayed is not branded like the rest of your site.&lt;br /&gt;&lt;br /&gt;This is because no theme is applied in the html output, but don't despair, help is at hand. The property LeadingHTML is exactly that, HTML, so I used it to inject a stylesheet link element that references the stylesheet for the current theme.&lt;br /&gt;&lt;br /&gt;&lt;p style="font-size:75%; background-color:#f5ede3;padding-left:10px;padding-bottom:15px;padding-right:10px;"&gt;&lt;br /&gt;string style = @"&amp;lt;link rel=""stylesheet"" type=""text/css"" href=""" + currentWeb.ThemeCssUrl + @""" /&amp;gt;";&lt;br /&gt;&lt;br /&gt;SPLongOperation op = new SPLongOperation(this);&lt;br /&gt;op.LeadingHTML = style + "[Enter your message here]";&lt;br /&gt;op.Begin();&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;After doing this I noticed a flicker at the top of the screen. This was because of the comment tags being rendered by the SPLongOperation. To fix this I also included a style element to hide the element that flickered.&lt;br /&gt;&lt;br /&gt;&lt;p style="font-size:75%; background-color:#f5ede3;padding-left:10px;padding-bottom:15px;padding-right:10px;"&gt;&lt;br /&gt;string style = @"&amp;lt;link rel=""stylesheet"" type=""text/css"" href=""" + currentWeb.ThemeCssUrl + @""" /&amp;gt;&amp;lt;style&amp;gt;td.ms-globalbreadcrumb {display:none;visibility:hidden;}&amp;lt;/style&amp;gt;";&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4909501580525837098-2705047894964290687?l=stephenkaye.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stephenkaye.blogspot.com/feeds/2705047894964290687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4909501580525837098&amp;postID=2705047894964290687' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4909501580525837098/posts/default/2705047894964290687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4909501580525837098/posts/default/2705047894964290687'/><link rel='alternate' type='text/html' href='http://stephenkaye.blogspot.com/2007/11/applying-theme-to-splongoperation.html' title='Applying a theme to SPLongOperation'/><author><name>Stephen K</name><uri>http://www.blogger.com/profile/02829592208885854213</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://profile.ak.facebook.com/profile5/1022/15/t581873335_131.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4909501580525837098.post-1531214399727284869</id><published>2007-11-14T13:55:00.000-08:00</published><updated>2008-03-14T00:39:50.162-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Reporting Services'/><category scheme='http://www.blogger.com/atom/ns#' term='rsItemNotFound'/><category scheme='http://www.blogger.com/atom/ns#' term='ReportViewerWebPart'/><title type='text'>RSViewer WebPart and Managed Urls</title><content type='html'>I have recently been developing a SharePoint solution that runs Reporting Services in SharePoint integration mode. I have a Site Definition for provisioning site collections and found that when I created a page with a ListView WebPart and connected it to a Reporting Services Report Viewer WebPart I received the following message in the report viewer web part.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The item 'http://www.mysite.com/[managedurl]/[SiteCollectionUrl]/[managedurl]/[SiteCollectionUrl]/[ReportLibrary]/MyReport.rdl' cannot be found. (rsItemNotFound)&lt;br /&gt;&lt;br /&gt;I quickly found that this is because the list view web part provides a a datarowview with a column called DocUrl that contains the server relative url to the document. But on consumption, the report viewer wewbpart prefixes this url with the site collection's url.&lt;br /&gt;&lt;br /&gt;&lt;p style="font-size:75%; background-color:#f5ede3;padding-left:10px;"&gt;&lt;br /&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I have a report library called "My Reports" that contains a report called "Report1.rdl". When on the root of the web application the site collection url is "http://www.mysite.com/" and the server relative url of the document is "/My Reports/Report1.rdl". The report view web part adds them together to get.&lt;br /&gt;&lt;br /&gt;  http://www.mysite.com/My Reports/Report1.rdl - That's fine&lt;br /&gt;&lt;br /&gt;Now lets consider the effect of the site collection being on a managed url.&lt;br /&gt;&lt;br /&gt;The site collection url would become "http://www.mysite.com/sites/site1" the server relative url of te report would be "/sites/site1/my reports/report1.rdl". Put them together&lt;br /&gt;&lt;br /&gt;  http://www.mysite.com/sites/site1/sites/site1/My Reports/Report1.rdl - ooops&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;To fix this I created a web part to act as a proxy between the ListView web part and the RS Viewer WebPart.&lt;br /&gt;&lt;br /&gt;&lt;p style="font-size:80%;font-family:courier; background-color:#f5ede3;padding-left:10px;"&gt;&lt;br /&gt;&lt;strong&gt;Code&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Runtime.InteropServices;&lt;br /&gt;using System.Web.UI;&lt;br /&gt;using System.Web.UI.WebControls;&lt;br /&gt;using System.Web.UI.WebControls.WebParts;&lt;br /&gt;using System.Xml.Serialization;&lt;br /&gt;&lt;br /&gt;using Microsoft.SharePoint;&lt;br /&gt;using Microsoft.SharePoint.WebControls;&lt;br /&gt;using Microsoft.SharePoint.WebPartPages;&lt;br /&gt;using System.ComponentModel;&lt;br /&gt;using System.Data;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;&lt;br /&gt;public class MyWebPart : System.Web.UI.WebControls.WebParts.WebPart, IWebPartRow&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; Queue&lt;RowCallback&gt; callbackQueue = new Queue&lt;RowCallback&gt;();&lt;br /&gt;&amp;nbsp; &amp;nbsp; object rowData;&lt;br /&gt;&amp;nbsp; &amp;nbsp; PropertyDescriptorCollection rowSchema;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; public MyWebPart()&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.ExportMode = WebPartExportMode.All;&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; protected override void CreateChildControls()&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; [ConnectionConsumer("AttrReportPathRowConsumer", "ReportDefinition", AllowsMultipleConnections = false)]&lt;br /&gt;&amp;nbsp; &amp;nbsp; public void SetRowProvider(IWebPartRow reportPathProvider)&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (reportPathProvider != null)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; reportPathProvider.GetRowData(new RowCallback(this.OnReportPathFromProvider));&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; [ConnectionProvider("Row", "blagh", typeof(DataFormProviderConnectionPoint), AllowsMultipleConnections = true)]&lt;br /&gt;&amp;nbsp; &amp;nbsp; public IWebPartRow GetProviderInterface()&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return this;&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; protected override void RenderContents(HtmlTextWriter writer)&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (this.rowData != null)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataRowView view = this.rowData as DataRowView;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (view != null)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int index = view.Row.Table.Columns.IndexOf("DocUrl");&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (index != -1)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; writer.Write(view.Row.ItemArray[index].ToString());&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; private void OnReportPathFromProvider(object rowData)&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataRowView view = rowData as DataRowView;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (((view != null) &amp;&amp; (view.Row != null)) &amp;&amp; ((view.Row.ItemArray != null) &amp;&amp; (view.Row.ItemArray.Length &gt; 0)))&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int index = view.Row.Table.Columns.IndexOf("DocUrl");&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (index != -1)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (!SPContext.Current.Site.ServerRelativeUrl.Equals("/"))&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string url = SPContext.Current.Web.Site.ServerRelativeUrl;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string serverRelativeReportPathUrl = view.Row.ItemArray[index].ToString();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string siteRelativeReportPathUrl = serverRelativeReportPathUrl.Remove(0, url.Length);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; view.Row[index] = siteRelativeReportPathUrl;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; view.Row.AcceptChanges();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.rowData = view;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.rowSchema = null;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sendRow();&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; private void sendRow()&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (callbackQueue.Count &gt; 0)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RowCallback callback = callbackQueue.Dequeue();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; callback(this.rowData);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; #region IWebPartRow Members&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; void IWebPartRow.GetRowData(RowCallback callback)&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (this.rowData != null)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; callback(this.rowData);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; callbackQueue.Enqueue(callback);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; PropertyDescriptorCollection IWebPartRow.Schema&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; get&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (this.rowSchema == null)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.rowSchema = TypeDescriptor.GetProperties(this.rowData);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (Exception)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return new PropertyDescriptorCollection(null);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return this.rowSchema;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; #endregion&lt;br /&gt;}&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4909501580525837098-1531214399727284869?l=stephenkaye.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://stephenkaye.blogspot.com/feeds/1531214399727284869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4909501580525837098&amp;postID=1531214399727284869' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4909501580525837098/posts/default/1531214399727284869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4909501580525837098/posts/default/1531214399727284869'/><link rel='alternate' type='text/html' href='http://stephenkaye.blogspot.com/2007/11/rsviewer-webpart-and-managed-urls.html' title='RSViewer WebPart and Managed Urls'/><author><name>Stephen K</name><uri>http://www.blogger.com/profile/02829592208885854213</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://profile.ak.facebook.com/profile5/1022/15/t581873335_131.jpg'/></author><thr:total>0</thr:total></entry></feed>
