Sunday, February 12, 2012

SharePoint 2010 - Save Site as Template error

I was trying to save my site as Template from the Site Settings page and got an unauthorized exception with a co relation id.
I went to the SharePoint  logs
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS
and found the following error on click of save site as template-
w3wp.exe (0x1A14)                           0x0998    SharePoint Foundation             General                           9fjl    Monitorable    SPSolutionExporter: System.UnauthorizedAccessException: Access to the path 'C:\Temp\SPSolutionExporter-5745c17f-255e-465e-81c9-aecb1fbce9b9\Test1ListInstances\Files\FormServerTemplates\Schema.xml' is denied.     at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)     at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)     at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)     at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 buffe...    9987739f-cb79-459e-b92a-24342b6591aa


I found a solution on technet and granted the app pool account my web app was running under access to C:\Temp folder. And it worked like a charm!

Cheero!


Wednesday, January 19, 2011

Convert DBASE DBF files to html,txt

This is a nice tool to convert .DBF files which are from DBASE to html or txt
http://www.dbfview.com/dbf-to-xls.html

The trial version helps you convert to html or txt. The licensed one converts to other formats like excel,sql and csv. A nice find!

Thursday, August 12, 2010

SharePoint 2007 CSS Bible

Click here for Heather Solomon's Sharepoint 2007 CSS bible
http://www.heathersolomon.com/content/sp07cssreference.htm

Wednesday, August 11, 2010

Get the GUID of a SharePoint List

I usually adopt this easy way of finding the GUID of a SharePoint List:
Go to the List or Library settings --> then right-click on the “Audience targeting settings” or “Information management policy settings” links and choose Copy Shortcut.

Paste this Copied Shortcut in a notepad.
You get a URL like this:

http://stdemo:36068/eaTest/_layouts/ListEnableTargeting.aspx?List={d50cb13c-4cf2-4569-9e5c-b9363c39bdb9}
The one in bold red between the braces is your List GUID

Updating a SharePoint List Item with a LookUp Column

I got this error
"Invalid data has been used to update the list item. The field you are trying to update may be read only" when I was trying to Update a List with a LookUp column called "Group".
This column looked up values from another list. The solution was to update the ID of the lookup column and it worked .
Here is the code snippet for the above:
SPList lst = listWeb.Lists[listName];
//Get the items of the list
SPListItem item = lst.Items.GetItemById(ItemID);

//Set the item of the list to the corresponding Group Name from the "LookUp" list .Note Group1 is the Internal name of the column Group
item["Group1"] = intGroupID;
listWeb.AllowUnsafeUpdates = true;
//The argument false for SystemUpdate informs the SPObject Model not to increment versions
item.SystemUpdate(false);
listWeb.AllowUnsafeUpdates = false;

Monday, August 2, 2010

Add Ajax 3.5 support in SharePoint

Here is an excellent link to add Ajax 3.5 support in SharePoint 2007. The author has detailedd the changes to the web.config

http://www.zimmergren.net/archive/2008/09/22/how-to-get-up-and-running-with-net-3-5-in-your-sharepoint-environment.aspx