Sign In
  • home
  • solutions
  • services
  • success stories
  • news
  • careers
  • partners
  • blogs
  • contact
 
Go Search
Categories
SharePoint
Administration
Development
Tips
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XsnLocation={ItemUrl}&OpenIn=Browser0x00x1FileTypexsn255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.2255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.3255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.4255
View in Web Browser/_layouts/images/ichtmxls.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=10x00x1FileTypexlsx255
View in Web Browser/_layouts/images/ichtmxls.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=10x00x1FileTypexlsb255
Snapshot in Excel/_layouts/images/ewr134.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=10x00x1FileTypexlsx256
Snapshot in Excel/_layouts/images/ewr134.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=10x00x1FileTypexlsb256
Other Blogs
There are no items in this list.
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XsnLocation={ItemUrl}&OpenIn=Browser0x00x1FileTypexsn255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.2255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.3255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.4255
View in Web Browser/_layouts/images/ichtmxls.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=10x00x1FileTypexlsx255
View in Web Browser/_layouts/images/ichtmxls.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=10x00x1FileTypexlsb255
Snapshot in Excel/_layouts/images/ewr134.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=10x00x1FileTypexlsx256
Snapshot in Excel/_layouts/images/ewr134.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=10x00x1FileTypexlsb256
Links
Archive
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XsnLocation={ItemUrl}&OpenIn=Browser0x00x1FileTypexsn255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.2255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.3255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.4255
View in Web Browser/_layouts/images/ichtmxls.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=10x00x1FileTypexlsx255
View in Web Browser/_layouts/images/ichtmxls.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=10x00x1FileTypexlsb255
Snapshot in Excel/_layouts/images/ewr134.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=10x00x1FileTypexlsx256
Snapshot in Excel/_layouts/images/ewr134.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=10x00x1FileTypexlsb256
livePoint Blogs > Posts > Data view / Data form web part causes a memory leak

4/12/2009

Data view / Data form web part causes a memory leak

 

We have found that when you add the WebUrl parameter to a data view – or the SPDataSource to be more exact (see below) to show the contents of a list from a different web to the current one:

<WebPartPages:DataFormParameter Name="WebURL" ParameterKey="WebURL" PropertyName="ParameterValues" DefaultValue="<your-web-url>"/>

and refresh the page in your browser, then you find these hideous messages in your SharePoint logs that look similar to this:

“An SPRequest object was not disposed before the end of this thread. To avoid wasting system resources, dispose of this object or its parent (such as an SPSite or SPWeb) as soon as you are done using it. This object will now be disposed. Allocation Id: {42A8CB1F-D1B6-41FA-9E2A-B1D64B4F5ADA} To determine where this object was allocated, create a registry key at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\HeapSettings. Then create a new DWORD named SPRequestStackTrace with the value 1 under this key.”

 

Steps to Reproduce:

(I assume that you have experience setting up data views)

STEPS TO REPRODUCE:

SETUP

1. Create 2 webs in a site collection from a Team site template (this will create the announcements list). For example

http://yourserver/sites/products/remote

and

http://yourserver/sites/products/local

2. Open SharePoint Designer (SPD) and open the web in /sites/products/local.

3. Add a data view web part to this page and point to the out of the box announcements list (in the local web)

4. Save the page and go to the browser to view the results.

5. Inspect your sharepoint log and you should NOT see any of the above error messages

 

CHANGE THE ListName

1.       Still in SPD in the local site. Go change the definition of your data view to point to the list name rather than to the ListID (this is important for the next step)

2.       Find the the <selectParameters> node in the code window in SPD and change the parameter for ListID to ListName and the guid of the List to the Name of the list

your web part definition should look like this (the bits that have changed are highlighted):

<SharePoint:SPDataSource runat="server" DataSourceMode="List" UseInternalName="true" selectcommand="&lt;View&gt;&lt;/View&gt;" id="dataformwebpart2">

  <SelectParameters>

    <WebPartPages:DataFormParameter Name="ListName" ParameterKey="ListName" PropertyName="ParameterValues" DefaultValue="Announcements"/>
  </SelectParameters>

2. Save and refresh your browser page

3. inspect your log and it should still NOT have the above error message.

 

POINT TO THE WEBURL

1.       Still in SPD in the local site. Add a new DataFormParameter to point to the 'remote' site.

2.       Add a new node to the <SelectParameters> xml node

<WebPartPages:DataFormParameter Name="WebURL" ParameterKey="WebURL" PropertyName="ParameterValues" DefaultValue="/sites/products/remote"/>

3.       your web part definition should look like this (the new node is highlighted)

 

<SharePoint:SPDataSource runat="server" DataSourceMode="List" UseInternalName="true" selectcommand="&lt;View&gt;&lt;/View&gt;" id="dataformwebpart2">

<SelectParameters>

<WebPartPages:DataFormParameter Name="WebURL" ParameterKey="WebURL" PropertyName="ParameterValues" DefaultValue="/sites/products/remote"/>

<WebPartPages:DataFormParameter Name="ListName" ParameterKey="ListName" PropertyName="ParameterValues" DefaultValue="Announcements"/>
</SelectParameters>

2. Save and refresh your browser page

3. inspect your log and you will see the memory leak message.

 

(I think the SPDataSource component is opening an SPWeb or SPSite object and it is not being disposed correctly when the connection is closed. This is a common error/issue with .net applications.)

We are looking at alternatives right now as this is causing issues with an intranet, specially since these web parts are in the master page so every page request causes this issue. Will keep you posted.

Posted at 10:38 AM by Sergio Otoya | Permalink | Email this Post | Comments (9)
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XsnLocation={ItemUrl}&OpenIn=Browser0x00x1FileTypexsn255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.2255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.3255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.4255
View in Web Browser/_layouts/images/ichtmxls.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=10x00x1FileTypexlsx255
View in Web Browser/_layouts/images/ichtmxls.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=10x00x1FileTypexlsb255
Snapshot in Excel/_layouts/images/ewr134.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=10x00x1FileTypexlsx256
Snapshot in Excel/_layouts/images/ewr134.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=10x00x1FileTypexlsb256

Comments

There are no comments yet for this post.
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XsnLocation={ItemUrl}&OpenIn=Browser0x00x1FileTypexsn255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.2255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.3255
Edit in Browser/_layouts/images/icxddoc.gif/_layouts/formserver.aspx?XmlLocation={ItemUrl}&OpenIn=Browser0x00x1ProgIdInfoPath.Document.4255
View in Web Browser/_layouts/images/ichtmxls.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=10x00x1FileTypexlsx255
View in Web Browser/_layouts/images/ichtmxls.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&DefaultItemOpen=10x00x1FileTypexlsb255
Snapshot in Excel/_layouts/images/ewr134.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=10x00x1FileTypexlsx256
Snapshot in Excel/_layouts/images/ewr134.gif/_layouts/xlviewer.aspx?listguid={ListId}&itemid={ItemId}&Snapshot=10x00x1FileTypexlsb256
Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.

Title


Body *


CommentUrl


Attachments

Copyright © 2007 livePoint

         Copyright  |  Privacy
         Terms of Use

home | solutions | services | sucess stories | news | blogs | careers | partners | contact