Welcome to MSDN Blogs Sign in | Join | Help

VS Extensions for SharePoint in 64 bit?

Sorry to say but it is not supported. You will have to use a 32 bit environment for development and use the output files on a 64 bit deployment. The reason is that even though VS can be installed in a 64 bit environment, it is still a 32 bit application and SharePoint is a 64 bit application.

IE8 - where did the Dev. toolbar go?

The dev.toolbar is included in IE 8, so don't expect any stand-alone releases. Read more of the features in IE 8 version and of debugging on:

http://blogs.msdn.com/ie/archive/2008/03/07/improved-productivity-through-internet-explorer-8-developer-tools.aspx

SharePoint.Performance: Optimizing Web Parts

Here are Eric Shupps top five tips for improving web part performance (feel free to add your suggestions to the comments):

 

  1. Take Out the Garbage

    One of the most common mistakes that new SharePoint developers make is failing to properly dispose of the objects they create. This is especially true of SPSite and SPWeb objects, mostly due to the fact that these are used everywhere and it's all too easy to initiate them then forget they are there. The trouble with such objects is that they are almost completely invisible to ASP.NET's trusty garbage collector. This recycle-happy process is quite good at showing up on time and getting rid of messy memory fragments lying around but it can't toss out what it doesn't see. Each of those SPSite and SPWeb objects lurking in the shadows consumes several megabytes of memory; get a few hundred of them loitering about and your application pools will have a real vagrant problem. To ease the strain, be sure to call the Dispose() method on all persisted objects or, better yet, wrap them in Using(…) statements and let the framework do your dirty work for you.

  2. Get Out of the Loop

    SharePoint has a pretty robust drivetrain, capable of hauling hundreds of thousands - even millions - of list items over hill and dale without breaking much of a sweat. But slap a foreach loop on a list with a few thousand items in it and watch all that well-oiled machinery sputter to a crawl. Iterating through large lists using an indexer is like pouring sand in your gas tank – it's hard to get anywhere running on sludge. The simple fact is that lists weren't designed to withstand this kind of abuse. All those announcements, issues, discussions, contacts, tasks and what not scattered about that big corporate intranet are stored in a single SQL table being accessed continually by a whole bunch of built-in procedures. Looping through all those items just to find the few you are looking for has to contend with every other read/write operation in the pipeline. Instead, use CAML queries or web services to retrieve a collection of just the items you want and leave the rest alone. Don't get drawn in by all those shiny indexing examples in the SDK; they may look good but you're going to pay a steep price at the pump.

  3. Make a List, Check it Once

    While it may be OK for Jolly ol' Saint Nick to be making lists willy nilly and checking them all twice, we SharePointers need to keep our data traffic down to a minimum. This means making as few calls to list objects as possible. Every time a list object's items are accessed it requires a round trip to the database, adding unnecessary overhead and latency to the equation. Instead of retrieving list items using an index value, such as SPList.Items[i], first get the collection of list items (SPListItemCollection items = SPList.Items;) then retrieve an item out of that collection (items[0] or items["Title"]). This isolates the request to an in-memory object and prevents SharePoint from having to make successive call to the database, which has much more important things to do than hang around waiting for someone's custom code to nag at it over and over again. That's just bad manners.

  4. Pimp Your (Over)Ride

    As Andrew Connell pointed out, that there Render() method ain't all it's cracked up to be. For one thing, it spits out some less-than-dandy HTML and throws horsepuckey all over the WPSC (for all you fancy Javascript-lovin' types). Worse, it's got some downright ornery habits when it comes to playing nice with the ASP.NET page lifecycle. Why? Well, to tell you the truth, I ain't exactly sure. But we've seen it over and over again during the development of our control-tracing mechanisms – overriding Render() can have strange effects on component processing in the page lifecycle. Best I can reckon, it "breaks" the defined inheritance model wherein the page invokes the web part Render() method from its own implementation of RenderChildControls(); these calls are processed in a particular order and overriding Render() directly seems to have unexpected results. Play it safe and rustle up a more docile method like RenderContents() (which is going to get called anyway) or CreateChildControls() and keep all those stampedin' Render critters in the O.K. Corral where they belong.

  5. One Web to Rule Them All

    For reasons that defy biology, SPWeb objects seem to reproduce in code faster than rabbits in springtime. How many times have you been strolling down a bright sunny Region and run smack dab into SPWeb after SPWeb, all chewing happily away on the same list? Pause for a few seconds to shoo them away and when you turn around five more pop up. Trouble is, SPWeb (as mentioned earlier) is no happy-go-lucky Easter Bunny – that little hopalong can chew up a whole bunch of w3wp's in nothing flat. So what to do? Well, start by invoking SPWeb objects only when the context changes (i.e. accessing lists in two different site collections). Then start passing those objects around instead of invoking new ones every time. Finally, if all the code being executed is confined to the web the user is currently browsing, use SPContext.Current.Web instead of creating a new SPWeb object from scratch. And for heaven's sake, don't let those SPWebs get too close to each other in the same method – you'll be chasing those little rascals down until next winter.

Adding a SharePoint Site Picker to a _layouts Page

El Blanco has published a nice article on usage of the Site Picker. Nice work and not as easy, as one might de deluded to think, to do from scratch.

 

http://chrissyblanco.blogspot.com/2008/07/adding-sharepoint-site-picker-to_03.html

Office Online RSS Feeds

If you want to subscribe to daily updates on all office aspects, go to:

http://office.microsoft.com/en-us/help/CH102069101033.aspx

and you will get RSS feeds for Office, SharePoint Designer, Publisher, Visio, SharePoint Server ++.

Infrastructure Update for Microsoft Office Servers and Windows SharePoint Services 3.0

Key updates for SharePoint Server 2007 include:

  • New Search features such as federated search and a unified search administration dashboard.
  • Several core fixes to Search to improve performance and scale.
  • Platform performance improvements and fixes.
  • Several core fixes to the publishing Content Deployment features to improve reliability.

Key updates for Windows SharePoint Services 3.0 include:

  • Platform performance improvements and fixes.
  • Several backup and restore fixes.
  • Several core Workflow fixes.

Download the updates here:

Infrastructure Update for Microsoft Office Servers (KB951297) - x86
Infrastructure Update for Microsoft Office Servers (KB951297) - x64
Infrastructure Update for Windows SharePoint Services 3.0 (KB951695) - x86
Infrastructure Update for Windows SharePoint Services 3.0 (KB951695) - x64
Infrastructure Update for Microsoft Office Project 2007 (KB951547) - x86

Posted by Thomas Læhren | 1 Comments
Filed under: , ,

How to compact a Virtual PC image

Most Sharepoint developers use Virtual PC for their development tasks. The VPC images has a tendency to grow very large, and the size of the VHD file is not reduced when you delete files.

Here are a few tips on how to reduce the image size by compacting the VHD file. To save space and reduce the size of a VPC image (several gigs depending on the setup) you can perform the following tasks:

Note! If you do this you might not be able to install additional services for windows that require the service pack files. Also, you will not be able to uninstall service packs and patches that have been installed.

  1. Make a backup of the VHD you want to compact 
  2. Enable "Show hidden files and folders" in Windows Explorer
  3. Delete all patch/service pack installation files from the c:\windows folder. This is the files beginning with $NtServicePack.. and $NtUninstall.. Do not delete $hf_mig
  4. Delete folder c:\windows\ServicePackFiles
  5. Delete files and folders inside C:\WINDOWS\SoftwareDistribution\Download
  6. Delete any other unwanted files like the IE cache, temp files etc.
  7. Reduce SQL logs
  8. Delete unwanted SQL databases
  9. Defragment the disk by using the Defrag tool
  10. Start the VPC and Capture the following ISO-image to add the PreCompact tool: C:\Program Files\Microsoft Virtual PC\Virtual Machine Additions\Virtual Disk Precompactor.iso
  11. Run the tool in the CD image. This can take anywhere from 5 mins to several hours. Typicall around 10 min for a 5 gig image.
  12. Shut down the VPC
  13. Run the Virtual Disk Wizard from the VPC console
  14. Select "Edit an existing disk"
  15. Locate the VHD file you want to compact
  16. Select "Compact it"
  17. Wait for several minutes until the process is finished
  18. The vhd size is now reduced. Start the VPC.
Posted by tommyo | 0 Comments
Filed under:

Podcasting Kit for Sharepoint

Microsoft has published a technology preview of Podcasting Kit for SharePoint on CodePlex. Check it out.

Posted by Frank Jusnes | 0 Comments

VSeWSS 1.2 is available!

VSeWSS 1.2 is out, and it supports Visual Studio 2008. However if you're still using VS2005 you must not upgrade, since the new version does not support it. Hopefully that will change... Read the announcement here.

Posted by Frank Jusnes | 0 Comments

Advanced Developers SharePoint 2007 Training in Norway

From Sahil Malik on the blah!bLaH!BLOG!!  http://blah.winsmarts.com/2008-6-Advanced_Developers_SharePoint_2007_Training_in_Norway.aspx

 

I will be conducting a SharePoint 2007 Training, aimed towards advanced developers, in Norway on September 1st 2008. This training will contain plenty of hands-on, and will be delivered entirely using:

-          Windows 2008

-          SQL Server 2008

-          Visual Studio 2008

-          IIS 7

That’s right! Older technologies will be covered as necessary to point out the differences as well. And there will be plenty of coverage of .NET 3.5+ topics such as WCF, Silverlight, LINQ, entity framework, as applied to SharePoint.

This course is aimed towards advanced developers – people who aren’t afraid to open Visual Studio, and cut slash the product to suit their needs. So certainly you will learn every aspect of writing features, solutions, etc. but this course will really put you at the next level compared to your peers because you will have a full mastery on IIS 7, and 2008 technologies, as they apply to SharePoint 2007.
For a full detail of what will be covered, and to register for this course, please visit this page.

 

 

www.MSSharePointDeveloper.com introduced at TechEd

SharePoint developer introduction for .NET developers! Check out Microsoft's new resource site for SharePoint developers at www.mssharepointdeveloper.com.

Posted by Frank Jusnes | 0 Comments

PDC Registration is Open!

Finally, PDC2008 registration is open. The conference is held in Los Angeles Convention Center, October 27-30 (pre-conference sessions Oct 26). Early bird discount before August 15. I'll be there! Will you?

Posted by Frank Jusnes | 0 Comments

Norwegian SharePoint Community, second meeting

 

The second meeting in the newly started Norwegian SharePoint Community group (link: here) were recently held. The meeting was fully booked (just as the 1. meeting), and there were a waiting list to attend. In other words a popular and most welcome initiative in the SharePoint community in Norway!

3 sessions were held, and the focus this time was usability and front end development experience and advice.

The first usability session, held by Anita Jenbergsen from Bouvet, elaborated on the added functionality to the http://www.statoilhydro.com/ site after its initial release. The functionality has had a very positive effect on usability for editors and includes:

  • Richer image handling and upload process
  • Custom Create Site and Create Page dialogs
  • Reporting dashboard for the items in the publishing pipeline and common tasks

The Front End session raised and answered some common front end issues that usually have to be dealt with in SharePoint development projects. The presenters, Ine Pettersen and Stig Nicolaisen (both Bouvet), demonstrated examples from http://www.statoilhydro.com/, REC intranet and Wilh. Wilhelmsen (WW) group intranet along with CSS best practices developed in the http://www.statoilhydro.com/ site.

Kristin Halvorsen from Objectware convinced the audience in the second usability session of some key points to be aware of in the initial phases of SharePoint projects to ensure usability.

The http://www.statoilhydro.com/ SharePoint site has with this received a lot attention in the Norwegian SharePoint Community as the 1. meeting included a session with Frank Jusnes, from Microsoft Consulting Services (MCS), focusing on the development process in SharePoint projects.

You can watch the sessions online, as they were recorded with LiveMeeting 2007 and RoundTable, link: here (supply a name and search).

 Running the sessions with LiveMeeting allowed participants nation-wide to attend, and this sets the standard for community meetings in the future! Unfortunately the Front End session were not recorded.

Hidden features and dependencies

Have you tried to enable some of SharePoint hidden features to play around with them? That might lead to some unexpected results and is not recommended approach to develop new solutions. This is because of the feature activation/deactivation dependencies.

A feature activation dependency is a way of expression a requirement of a relationship between two features.

In WSSv3, activation dependencies can be used to accomplish two things:

  • feature grouping concepts.  When my feature is turned on, turn on these other x number of features.  Ie. the "team collaboration" feature in WSS uses activation dependencies to essentially turn on other features when you turn on team collab.
  • feature resource guarantees.  A lot of times you need an SPSite feature to contain resources (e.g., a content type), and and SPWeb feature to contain an implementation.

Feature Activation Dependencies in the Same Scope

  • If a feature is dependent on another feature at the same scope, and that feature is not on, it will be turned on.
  • If a feature is turned off, turn off any dependent hidden features according to a "last one turns out the lights rule."

Feature Activation Dependencies Across Scopes

  • Feature activation dependencies are not supported across scopes if the dependent feature is not visible (i.e., you can't have a web scoped feature dependent on a site scoped feature that the admin can't see in the site feature UI.)
  • If the dependent feature is not activated, activation of the dependee feature will fail.

General Restrictions:

  • You can't have a dependency from a 'higher' scope to a 'lesser' scope
  • Dependencies can only work one level deep. 
  • Hidden features are frequently used as dependent features, but cannot themselves have dependencies.

Troubleshooting SPSite/SPWeb leaks in WSS v3 and MOSS 2007

Stefan Gossner has published a great article on the subject:

In an earlier article I have discussed that all SPSite and SPWeb (and potentially also PublishingWeb) objects need to be properly disposed to avoid memory pressure situations. Roger Lamb has a nice summary of coding patterns which will actually cause such leaking objects and also provides information about how such code would have to be adjusted to avoid such leaks.

In this article I will provide some details about how a sharepoint administrator is able to isolate if the site contains custom code which does not properly dispose these objects and also how to isolate the components that are leaking these objects.

Go to Stefan Gossner's blog to read the full version - http://blogs.technet.com/stefan_gossner/archive/2008/05/07/troubleshooting-spsite-spweb-leaks-in-wss-v3-and-moss-2007.aspx

More Posts Next page »
 
Page view tracker