Archive for 'SharePoint'

“Object reference not set to an instance of an object” executing STSADM commands

Posted on 24. Aug, 2009 by .

3

If you are attempting to execute STSADM commands, and are receiving the ominous “Object reference not set to an instance of an object” error, make sure that the user account that are using to execute STSADM has permissions to the SQL database.  I ran into an issue today where the domain account had permissions to the WFE but not to the SQL server, and whereas I could work in Central Admin, and perform other Farm Administrator duties, STSADM commands were failing with the above error.  Once my account was added to the local Administrators group of the SQL server the STSADM commands executed without fail.

Bookmark and Share

Continue Reading

Promising SharePoint projects on CodePlex

Posted on 18. Jun, 2009 by .

1

I spent some time on CodePlex today researching the latest open-source SharePoint projects.  I probably haven’t peeked through CodePlex in the past 6 months, and I was very encouraged by the quantity of projects out there.  Following are the ones of particular interest to me:

SharePoint Content Deployment Wizard

http://spdeploymentwizard.codeplex.com/

The SharePoint Content Deployment Wizard is a tool for SharePoint 2007 which provides the means to deploy the following content:
- site collections
- webs
- lists
- folders
- list items (including files)
Content is exported using the Content Migration API (PRIME) as a .cmp file (Content Migration Package) which can be copied to other servers for import. Unlike the out-of-the-box tools, the Wizard allows *granular* selection of content via a treeview.

 

SharePoint Access Checker Web Part

http://accesschecker.codeplex.com/

Quickly check what objects within a Sharepoint site hierarchy a user has access to.

The Access Checker Web Part is a Windows Sharepoint Services Web Part, for use within Windows Sharepoint Services v3 and Microsoft Office Sharepoint Server 2007, that displays a tree view showing permissions on objects for a user scoped to a Site hierarchy. It also has a second mode which will show the permission inheritance of objects within a Site hierarchy.

 

 

SharePoint ULS Log Viewer

http://ulsviewer.codeplex.com/

A windows application for viewing SharePoint ULS log files more easily. Supports filtering and easy viewing of data.

SLAM! SharePoint List Association Manager

http://slam.codeplex.com/

Most developers who have used SharePoint as an application development framework have run into the realization that SharePoint is NOT a relational database. In fact, the accepted wisdom is if you need relational tables, use ASP.NET/SQL straight-up, not SharePoint.

Enter SharePoint List Association Manager (SLAM). In short it allows you to define relationships (one to one, one to many, many to many) between SharePoint lists (or Content Types) and then leverage those relationships in webparts or custom field types using familiar and straight forward SQL queries.

Have I missed any?  Please comment if there is a “must have” (except WSPBuilder of course, everyone knows that :-) ) I have omitted!

Bookmark and Share

Continue Reading

Microsoft SharePoint Team Blog : Attention: Important Information on Service Pack 2

Posted on 26. May, 2009 by .

0

Microsoft’s SharePoint team has announced that there is a bug in Service Pack 2 for MOSS that will trigger SharePoint to believe it is a trial instance of the product.  A workaround is supplied by Microsoft:

We are working to release a hotfix to automatically fix this issue. A manual work-around is currently available and involves customers re-entering their Product ID number (PID) on the Convert License Type page in Central Administration.  For more information and detailed steps please read this KB article.

In addition, Microsoft is working on a hotfix to be released shortly.  More information can be found on the Microsoft SharePoint Team Blog:

Microsoft SharePoint Team Blog : Attention: Important Information on Service Pack 2

Bookmark and Share

Continue Reading

SharePoint SP2 is RTW

Posted on 28. Apr, 2009 by .

0

SharePoint SP2 is Release to World (RTW) as of today.  Some of the highlights from the SharePoint team blog:

Benefits

Customers can be benefited from the following enhancements with Service Pack 2.

  • Performance and Availability Improvements

Service Pack 2 includes many fixes and enhancements designed to improve performance, availability, and stability in your server farms, including:

    • New Timer job automatically rebuilds content database index to improve database performance.
    • When a content database is marked as read-only, the user interface will be modified so users cannot perform tasks that require writing to the database.
    • Performance enhancement across nearly all the components.
  • Improved Interoperability

Service Pack 2 continues to improve SharePoint interoperability with other products and platforms.

    • Broader support of browsers
      Internet Explorer 8 is added into Level 1 browser support.
      FireFox 2.0/3.0 is added into Level 2 browser support.
    • Provide improved client integration user experience with Form Based Authentication. Now the client application can store user credentials instead of asking for them every time. For more technical details please refer to the updated articles on TechNet.
      Configure forms-based authentication (Office SharePoint Server
      http://technet.microsoft.com/en-us/library/cc262201.aspx
      Configure forms-based authentication (Windows SharePoint Services)
      http://technet.microsoft.com/en-us/library/cc288043.aspx
  • Getting Ready for SharePoint Server 2010

A new preupgradecheck operation is added to stsadm tool. It can be used to scan your server farm to establish whether it is ready for upgrade to SharePoint Products and Technologies "14". It identifies issues that could present obstacles to the upgrade process. It checks for several SharePoint Products and Technologies "14" system requirements, including the presence of Microsoft® Windows Server® 2008 and a 64-bit hardware, and provides feedback and best practice recommendations for your current environment, together with information on how to resolve any issues that the tool discovers. 

I am particularly excited about the early release of the preupgradecheck tool.  This will allow IT departments to begin planning 2010 deployment rollout well in advance, and identify any significant hurdles.  Of course, “performance enhancement across nearly all the components” is also a welcomed improvement!

Bookmark and Share

Continue Reading

Error when deleting list columns in SharePoint

Posted on 28. Apr, 2009 by .

0

Received the following error when trying to delete a list column: 

“Unable to validate data.”

CropperCapture[1]

Thanks to Angela Chng for the solution:

Did you customize your application master pages and get this error while trying to delete list columns?

Unable to validate data. at System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength)  
at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) 

Ok that probably means you have a search box in the template which is messing things up, just remove it or hide it, and that will do the trick!

Removed the search box from the application.master and the issue was resolved!

Bookmark and Share

Continue Reading

SharePoint Designer available as a free download

Posted on 03. Apr, 2009 by .

1

Microsoft has released SharePoint Designer as a free download (http://blogs.msdn.com/sharepoint/archive/2009/04/02/sharepoint-designer-available-as-a-free-download.aspx)!  My friend and colleague Jeff Becraft discusses this news, and provides sage advice to proceed with caution (Becraft’s Blog: The rumors are true! SharePoint Designer is now a FREE DOWNLOAD!). 

From my vantage point as an architect and developer of SharePoint solutions, it is important to note where it is appropriate to use SharePoint Designer (SPD) and where it is more appropriate to develop SharePoint solution packages (WSP) using Visual Studio.  I frequently use SPD for what I would consider “power user” tasks, such as creating one-off workflows.  I also use SPD to create Data View Web Parts, although I will typically export the web part from WPD and move it into a Visual Studio project for deployment and version control.

In short, this is a great win for SharePoint users, be mindful as an organization and/or development team around some of the following:  how will I version the work I’m doing in SPD?  how will I perform code promotion (development, integration, staging, production)?  is this solution generic and can I deploy it to other sites or site collections?

Happy customizing!

Bookmark and Share

Continue Reading

Office Picture Manager won’t open after clicking “Upload Multiple” in Picture Library

Posted on 19. Mar, 2009 by .

7

There’s a title for you!  In any event, a client ha an issue where after clicking "Upload Multiple" in a SharePoint Picture Library, the Microsoft Office Picture Manager would not load.  After digging through the page source, it was determined that SharePoint uses the "OISCTRL.OISClientLauncher" class from the "OISCTRL.dll" to power the Upload Multiple functionality in Picture Libraries.  I wrote the following script to test the functionality of this component on the client machine:

   1:  Set o = CreateObject("OISCTRL.OISClientLauncher")
   2:  o.LaunchOIS "ois.exe /upload ""http://sharepointpicturelibraryurl.com"""

The result was "Unspecified error".  A further review of the SharePoint javascript indicated that it first looks for "OISCTRL.OISClientLauncher" but if it doesn’t find it, it will fall back to good ‘ole "STSUPLD.DLL" which powers the standard upload multiple functionality.  For now, we have worked around the issue by unregistering "OISCTRL.dll" which is in the C:Program FilesMicrosoft OfficeOFFICE12 directory:

regsvr32 /u OISCTRL.dll

If anyone has an actual fix for OISCTRL.dll not being able to launch the ois.exe process, let me know!

Bookmark and Share

Continue Reading

Late to the ball-game: Change to licensing for MOSS Internet + Intra/Extranet

Posted on 17. Dec, 2008 by .

0

I was preparing a response to an RFP today for SharePoint that required Forms Services to be used for both anonymous Internet sites AND authenticated-user Intranet scenarios.  When I first reviewed this requirement I thought, "Oh snap!  MOSS licensing doesn’t permit mixing Internet and Intranet, this will need to be two farms!".  I was dead certain of this.  So certain, that I wanted to go straight to the Microsoft Office SharePoint Server 2007 frequently asked questions page and quote it in the response.  This is when things took a turn.  My world was flipped upside down.  Dogs and cats, living together.  Mass hysteria.  The following is what I found:

HideCan I mix SharePoint editions in the same farm?

For Microsoft Office SharePoint Server and Microsoft Office SharePoint Server for Internet Sites, the use of a server determines its licensing requirements, not its location in one farm or another. Consequently, you can mix Microsoft Office SharePoint Server and Microsoft Office SharePoint Server for Internet Sites within the same farm–so long as the use cases are licensed appropriately. However, because Microsoft Office SharePoint Server 2007 for Internet Sites licenses the functionality of the Microsoft Office SharePoint Server Enterprise CAL, you will need to ensure that your users only access functionality they are licensed for based on their CALs.

Microsoft Office Forms Server and Microsoft Office Forms Server for Internet Sites cannot be mixed with Microsoft Office SharePoint Server and Microsoft Office SharePoint Server for Internet Sites.

Additionally, as an accommodation for various possible deployment scenarios, customers wishing to consolidate their SharePoint needs under a single deployment may acquire licenses for both Office SharePoint Sever and Office SharePoint Server for Internet Sites, assign those licenses to the same servers, and use the same running instances of the software simultaneously under both licenses. However, customers must acquire CALs as required under the Office SharePoint Server use rights for users and devices accessing content in any manner not permitted under the Office SharePoint Server for Internet sites use rights.

WHAT?!?!?!  How could this be????  I distinctly remember it stating that you could NOT mix Internet Sites with Enterprise or Standard.  It was a cardinal rule!  Break it at your own peril!  Could I have been mistaken?  (Here’s a hint, I’m never wrong.  Ask my wife ;-)I was distraught.  I felt like I had been hoodwinked.  So I did a quick search to see if the licensing terms had changed.  For the sake of my sanity, thankfully I found this blog post regarding the change to the MOSS licensing.  In it, Tom Rizzo states the following:

I’m happy to say that beginning Sept 1st, we made a change that makes running MOSS Server Licenses and MOSSFIS legal in the same farm. So, let the deploying begin! One thing to realize is that this does not reduce the number of licenses you need to buy. So, if you’re running MOSS Server licenses and MOSSFIS on the same farm, you still need to buy both licenses as well as the correct number of client access licenses (CALs) for your internal users.

Sweet vindication!  Well.  Sort of.  I am writing this blog posting December 17th, 2008.  Tom Rizzo wrote HIS blog post September 23rd, 2007.  Apparently I got this news roughly 15 months late.  Ouch. 

Bookmark and Share

Continue Reading

“The security validation for this page is invalid”

Posted on 18. Nov, 2008 by .

4

I’m currently working on a SharePoint project that makes extensive use of programmatically setting ListItem ACL’s.  There is a List Event Handler which sets ACLs on the ItemAdded event, but then there is an administrative interface that enables administrators to reassign list items to another user which effectively means replacing the ACLs for the ListItem to give another user Contribute.

In any event, I keep encountering the dreadful "The security validation for this page is invalid" error when trying to perform the ACL updates, specifically from web parts (haven’t seemed to have this issue on list event handlers).  Well it appears that I’ve finally come up with the magic combination of fixes.  There are several blog postings out there indicating that you should use "AllowUnsafeUpdates" on your SPWeb object.  This seems to fix things for many people, however, the code I was working on calls "BreakRoleInheritance".  Apparently that bugger ends up reverting the "AllowUnsafeUpdates" flag back to false after you call it!

Here’s the information that Paul Yau shared in a thread on the MSDN forums which took care of my issue, thanks for sharing Paul!

Problem Description:

===============

When you call SPList.BreakRoleInheritance(false) from an HTTP GET request, although you have specified SPWeb.AllUnsafeUpdates=true, you will still be thrown an exception

Updates are currently disallowed on GET requests. To allow updates on a GET, set the ‘AllowUnsafeUpdates’ property on SPWeb.

Cause:

=====

This is by design limitation of SPList.BreakRoleInheritance

BreakRoleInheritance does it work in two steps. First, it needs to revert its permission to have same permission settings as parent (this is a less expensive operation, and give the list a fresh start on its road to unique permission). Later it checks CopyRoleAssignments parameter. If it is false, it takes an extra step to clean up permission on the list. A side effect of step 1 is that it dirties some internal objects in SPWeb, and cause them to be recreated. Unfortunately, the re-creation of those internal objects cause SPWeb.AllowUnsafeUpdates to have a default value which is false. That is, SPWeb.AllowUnsafeUpdates is reset in middle of call to SPList.BreakRoleInheritance, therefore we got the exception.

Resolution:

========

There are two possible workarounds to the issue:

1.       Call SPList.BreakRoleInheritance from a HTTP POST request. That is, we can first have a button on UI and have users to click. In response to users’ click, we call SPList.BreakRoleInheritance. There is a first HTTP GET request by which, SharePoint has a chance to embed some digest to validate requests on return (HTTP POST). Therefore, we no longer need to set SPWeb.AllowUnsafeUpdates=true. This is recommended approach from security perspective.

2.       First call SPList.BreakRoleInheritance(true). Then, use custom code to clean up permission and create your own permission set for the list as needed. The sample code are:

SPWeb web = SPControl.GetContextWeb(this.Context);

SPListCollection lists = web.Lists;

//Guid docLibGuid = lists.Add("Doc Lib Sample 1", "Doc Lib Desc", SPListTemplateType.DocumentLibrary);

//SPList docLib = lists[docLibGuid];

SPList docLib = lists["Doc Lib Sample 1"];

//docLib.ParentWeb.AllowUnsafeUpdates = true;

docLib.BreakRoleInheritance(true); //Exception throw here when the parameters is "false"

web.AllowUnsafeUpdates = true;

SPRoleAssignmentCollection roleAssigns = docLib.RoleAssignments;

for (int i = roleAssigns.Count-1; i >= 0; i–)

{

    roleAssigns.Remove(i);

}

Bookmark and Share

Continue Reading

Where is my storage space going?

Posted on 17. Nov, 2008 by .

1

Over the past few weeks I have had several instances of where I need to know how where space is being allocated within a site collection.  For instance, one client has seen tremendous growth of the site collection database, but is not sure how/where/why the space is being used.  Another client has also seen rapid content database growth, and would like to make sure the space allocation is legitimate.

On the surface it did not appear that SharePoint had an out-of-the-box solution for this, which seemed criminal.  A few products out there seemed to fill that void:

However, finally, today I came across a solution that IS right there out-of-the-box.  While researching a completely unrelated issue, I discovered the _layouts/storman.aspx file, as referenced here.  The trick is that you must have a site collection quota specified in order to use this feature.  Once you configure a quota you will see "Storage space allocation" located under "Site Collection Administration" in Site Settings:

stormanlink

When you click on "Storage space allocation" you receive a page similar to the following (but without the huge black block protecting the innocent):

storman

You can see that it shows the amount of space used in relation to the configured site quota, and then by default displays the amount of space being consumed by various document libraries in descending size!  Fantastic!

Definitely not as complete as the Nintex or Quest Software solutions, but its great that there is in-fact an out-of-the-box way of achieving this.

Bookmark and Share

Continue Reading