SharePoint Blog - René Hézser

Anmelden  RSS Feed RSS Feed
Startet die Suche

Nov 302009

SPDispose or not to SPDispose

Roger Lamb has posted an article about SharePoint objects, which must not be disposed. He also wrote about changes to SP 2010 regarding disposing objects.

  • SPContext.Current.Site
  • SPContext.Current.Web
  • SPContext.Site
  • SPContext.Web
  • SPControl.GetContextWeb(..)
  • SPControl.GetContextSite(..)
  • SPFeatureReceiverProperties.Feature.Parent
  • SPItemEventProperties.ListItem.Web
  • SPList.BreakRoleInheritance()
    • Do not call list.ParentWeb.Dispose()
  • SPListEventProperties.Web
  • SPListEventProperties.List.Web
  • SPSite.RootWeb
    • Problems may occur when SPContext.Web has equality to the SPContext.Web.. make sure you dispose of SPSite and it will cleanup sub webs automatically
  • SPSite.LockIssue
  • SPSite.Owner
  • SPSite.SecondaryContact
  • SPWeb.ParentWeb
  • SPWebEventProperties.Web

More on his blog: http://blogs.msdn.com/rogerla/archive/2009/11/30/sharepoint-2007-2010-do-not-dispose-guidance-spdisposecheck.aspx


Published: 11/30/2009  10:48 PM | 1  Comment | 0  Links to this post
Tagged as: Development, SharePoint

Nov 232009

Installing SharePoint 2010 on Windows 7

I guess everybody knows by now. But if not: The beta 2 of Visual Studio 2010 brings SharePoint Development tools as an option.

After all the Videos and Screencasts about SP 2010 development, I wanted to try it myself. So I installed VS 2010 on my notebook.

VS 2010 Setup

An SQL Server 2008 has already been installed. I’ll skip that part as well.

So here we go…

Oh. Did I say thank you to you MS guys for supporting SP 2010 on Windows 7? Now? Thank you!

To set up a SP 2010 development machine, read this Technet article.

Here are my steps:

start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;IIS-RequestFiltering;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI;WCF-HTTP-Activation;WCF-NonHTTP-Activation

  • Install SP 2010

The Setup

image

Uh. What the heck is the product key? OK. Found it.

Read the license, and accept it on the next screen.

Installation mode

image

“Standalone”? I’ve never used that one. So don’t start with it now. The same is with the Server Type.

image

Storing the data on a separate partition is a good idea.

image

image

After a cup of coffee…

image

It took the setup some time to complete.

image 

I did not run the configuration wizard when the setup finished, because I wanted to install a hotfix first, which resolves an issue that occurs when provisioning Service Applications, and the CU1 for SQL Server 2008.

Now we can continue setting up our SharePoint by running the configuration wizard.

image

Yes, I know. Go ahead…

image

Ah. I did mention that I’d like to run my development environment without the overhead of a VM? ;-)

This one should be obvious.

image

The account running services should be domain account. If you want to use local accounts instead, you can find a guide here: http://sharepoint.microsoft.com/blogs/fromthefield/Lists/Posts/Post.aspx?ID=112

Because I am carrying my notebook around and SP is still a beta, I’ll use local accounts. So I follow the guide mentioned above.

Please make sure you are connected to the domain of the currently logged on user before you run the PowerShell command!

 

Run the SharePoint Configuration Wizard to complete the configuration of the farm.

image

After the wizard has done its job, you are done.

image

 

To end this post, I’ve to show another screenshot.

image

When I tried to create a new “Visual Web Part” project, another windows popped up:

image

Grrr. But the solution is simple. Restart the VS 2010 with administrative permissions.

Update:

  • If you cannot create a new sitecollection because every sc owner you specify is not found, add the local account you used to the local administrators. Then use this account as sc owner when you create a new sitecollection.
  • Grant your AD account sitecollection owner permissions by running stsadm –o siteowner

Published: 11/23/2009  10:04 PM | 0  Comments | 1  Links to this post
Tagged as: SharePoint

Nov 192009
Nov 182009

SharePoint Konferenz 2010, ich bin dabei

Auch im nächsten Jahr ist die SharePoint Konferenz wieder in München. Und zwar am 24.-25. Februar 2010.

SPkonfBanner

Mit einer Session zum Thema “BCS und SharePoint auf dem Client” bin auch ich wieder mit dabei.

Der Business Data Catalog heisst jetzt Business Connectivity Service. Daten können nun nicht nur von anderen Datenquellen gelesen, sondern auch zurück geschrieben werden. SharePoint auf dem Client? Aber nicht mit Webservices, sondern mit einem kompletten Objektmodell. In Verbindung mit den BCS kann SharePoint mit Silverlight oder ein Client mit WPF alle Daten nutzen, die im SharePoint zur Verfügung stehen.

Wer mich also immer noch nicht kennengelernt hat, kann das gerne in München nachholen.


Published: 11/18/2009  9:34 PM | 1  Comment | 0  Links to this post
Tagged as: SharePoint