Okay here’s another baffling API bug: If you parse a date using SPUtility.ParseDate(web, “11/29/2009 13:37:12″, SPDateFormat.DateTime, false) it will return you a date object without parsing the time! Remove the seconds SPUtility.ParseDate(web, “11/29/2009 13:37″, SPDateFormat.DateTime, false) and we are good to go. Full program listing of bug follows: The above code assumes you have US [...]
Archive for November, 2009
SPUtility.DateParse !♥ seconds: SPUtility.DateParse removes the time component if you parse a date that incudes seconds!??!
Posted in sharepoint, tagged bug, sharepoint, SPUtility, SPUtility.DateParse on November 30, 2009 | 1 Comment »
SPLimitedWebPartManager.SaveChanges throws Microsoft.SharePoint.WebPartPages.WebPartPageUserException: The file is not checked out.
Posted in sharepoint, tagged provisioning, sharepoint, webpart, webpartmanager on November 29, 2009 | 5 Comments »
Got stuck on this one for a long time, more than an hour Microsoft.SharePoint.WebPartPages.WebPartPageUserException: The file is not checked out. You must first check out this document before making changes. at Microsoft.SharePoint.WebPartPages.SPWebPartManager.SaveChangesCore(SPLayoutProperties layoutProperties, Boolean httpGet, Boolean saveCompressed, Boolean skipRightsCheck, Guid& newTypeId, Byte[]& newAllUsersProperties, Byte[]& newPerUserProperties, String[]& newLinks) at Microsoft.SharePoint.WebPartPages.SPWebPartManager.SaveChangesCore(SPLayoutProperties layoutProperties, Boolean httpGet, Boolean saveCompressed, Boolean [...]
Provisioning a Web Part with a predefined ID in your onet.xml of element manifest.
Posted in sharepoint, tagged onet.xml, provisioning, sharepoint, webpart on November 29, 2009 | Leave a Comment »
From time to time you might want to provision your WebParts using the CAML markup and then modify them in a feature later on. Most examples on the web find the webpart based on it’s title. i.e. However you can specify the ID of a web part in your onet.xml / element manifest like so: [...]
Problems installing SharePoint 2010 Beta 2 – SQL Server at XXX has an unsupported version 10.0.2531.0. The minimum required SQL versions…..
Posted in sharepoint, tagged sharepoint, sharepoint2010 on November 28, 2009 | 1 Comment »
First little problem I came across when installing SharePoint 2010 was the following error: SQL Server at XXX has an unsupported version 10.0.2531.0. The minimum required SQL versions are SQL Server 2005 SP3 CU3, version number: 9.00.4220.00, downloadable from “http://support.microsoft.com/kb/967909”, or SQL Server 2008 SP1 CU2, version number 1.00.2714.00, downloadable from “http://support.microsoft.com/kb/970315”. CU stands [...]
SharePoint can not debug assemblies
Posted in development, sharepoint, tagged debugging, sharepoint on November 26, 2009 | Leave a Comment »
If you are ever having problems getting Visual Studio to break into your code and you develop by deploying your dll’s into the GAC, it’s probably down to mismatching PDB’s. Do a Clean Solution Rebuild the solution Re-Gac all your dll’s Reattach to IIS processes Other hints Locked files in the GAC Some times a [...]
Shared Services Administration: Add Audience Rule – No exact match was found. Error
Posted in sharepoint, tagged audience, sharepoint, userprofiles on November 25, 2009 | Leave a Comment »
Trying to setup an audience this morning based on being a “Member Of” an Active Directory group. The Active directory group had been created earlier, however entering it into the value field kept producing the annoying “No exact match was found.” Your mileage may vary but I solved this issue by: Running a full [...]
How to add an image web part / ImageWebPart part via your onet.xml or elements manifest
Posted in sharepoint, tagged ImageWebPart, onet.xml, sharepoint, webpart on November 16, 2009 | Leave a Comment »
Properties of note: ImageLinkUrl to image, can be relative. Note tokens are supported in this xml element, i.e. ~SiteCollections/SiteCollectionImages/logo.gif
How to add a content editor web / ContentEditorWebPart part via your onet.xml or elements manifest
Posted in sharepoint, tagged ContentEditorWebPart, onet.xml, sharepoint, webpart on November 16, 2009 | Leave a Comment »
The important part here is to remember to html encode the Content element. You can encode html online using this handy website: http://www.opinionatedgeek.com/dotnet/tools/htmlencode/Encode.aspx
Restoring an old friend – Visual Studio 2008 Create GUID tool
Posted in development, sharepoint, tagged .net, devenvironment on November 12, 2009 | 1 Comment »
Remember to recreate a link to guidgen.exe (Guid generator tool) after installing Visual Studio 2008. For some reason it’s no longer out of the box? Choose the Tools -> External Tools… Title: Create &GUID Click the Browse (…) button and find the guidgen.exe in the C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\ folder. See a better crafted posting [...]