SharePoint Blog - René Hézser

Anmelden  RSS Feed RSS Feed
Startet die Suche

Archive

Kategorien

Links

Andere Blogs



Add to Technorati Favorites

Mar 292009

SPWeb/SPSite.Dispose()

By now most of you should know that there is a SharePoint Diagnostics Tool. This really is a great tool, since it scans your assemblies for memory leaks.

You should also know, that there is an occasion you can create a memory leak which the tool will not recognize.

   1:  using (var site = new SPSite("http://yoururl"))
   2:  {
   3:      SPWeb web = null;
   4:      try
   5:      {
   6:          web = site.OpenWeb();
   7:          // do something with this web
   8:          // ...
   9:          // done. don't need it anymore. but i need another web
  10:          web = site.AllWebs["webname"];
  11:      }
  12:      finally
  13:      {
  14:          if (web != null) web.Dispose();
  15:      }
  16:  }

The SPWeb from line 6 will not be disposed in line 14, because in line 10 we assign another SPWeb to the web!

So what do we do?

Just dispose the web manually, before we assign a new SPWeb to it. You can use two usings around the webs, or dispose it via web.Dispose(). That’s it.


Published: 3/29/2009  8:57 PM | 0  Comments | 0  Links to this post
Tagged as: SharePoint, Development

Mar 232009

OWL SharePoint Usergroup am 12. Mai

Nach derzeitiger Planung wird die erste SharePoint Usergroup in OWL am 12. Mai ab 18h in Paderborn stattfinden.

Weitere Informationen wird es hier, und auf der SharePoint Community Webseite geben.

Das Treffen wird in den Räumen von Net at Work stattfinden. Eine Anfahrtsbeschreibung kann hier heruntergeladen werden: --> Anfahrtsbeschreibung

Themen:

Business Data Catalog

Nach derzeitigem Planungsstand, werde ich einen Vortrag zum Thema BDC halten. Der Business Data Catalog erlaubt die Einbindung von Daten aus anderen Systemen.

Hierzu werden wir einen Webservice erstellen, der sich mit einer Datenbank verbindet. Dieser wird vom BDC “angezapft”, und die Informationen in Listen genutzt.

Anmeldung:

Wenn ihr zum ersten Treffen kommen möchtet, schickt doch bitte eine Email an ug-owl (at) mysharepoint.de. Dann können wir besser planen.


Published: 3/23/2009  7:31 PM | 1  Comment | 0  Links to this post
Tagged as: UserGroup

Mar 172009

Publish Word documents to a SharePoint Wiki

How do you copy the content from a Word document to a Wiki library? A simple Copy&Paste does not work, as it omits the pictures from the document.

Andreas Strothmann has posted a interesting way for deploying Word docs to a Wiki library.

His steps are:

  1. Open your Word document
  2. Save it as docx if it is an old doc
  3. Publish the document to a SharePoint Blog
    Note: the pictures included in the Word document will be uploaded to the Blog picture library! So do not delete the Blog site later, and make sure your Wiki visitors can read items from the picture library.
  4. Open the Blog entry in your browser and click on the Edit Button
  5. Copy the whole entry
  6. Paste the clipboard to a Wiki page

Published: 3/17/2009  2:52 PM | 3  Comments | 0  Links to this post
Tagged as: SharePoint

Mar 142009

SharePoint Designer for free?

As Bill Simser posts in his blog, the SharePoint Designer will be available for free download from April 1st.


Published: 3/14/2009  10:03 AM | 0  Comments | 1  Links to this post
Tagged as: SharePoint