Warning: unserialize() expects parameter 1 to be string, array given in /home/activesu/public_html/mscrmblog.net/wp-content/themes/hybrid/functions.php on line 61

Sharepoint


SharePoint 2010 Developer Dashboard

SharePoint 2010 Developer Dashboard

Developer Dashboard is one of the hidden features in SharePoint 2010. It is turned off by default.
Enabling this feature will help you get critical information such as Execution time, log ID, critical events, database queries, service calls, SPRequest allocation and webpart events.
Developer Dashboard Modes:
‘On’ Mode:
STSADM:
stsadm -o setproperty -pn developer-dashboard -pv on
Powershell:
$sp2010 = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;
$sp2010.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::On;
$sp2010.RequiredPermissions = [...]

Failures in SharePoint

Failures in SharePoint


Backup and restore your SharePoint website using SharePoint Designer

Found this PDF on how to backup and restore your SharePoint (SPWeb) website using SharePoint Designer: backup-restore-share-point-2007.pdf
Kudos to the Creator of the PDF.

SP - Uploading files to SharePoint document library

here we go, just some simple upload code that uploads documents into a document library.
It also checks if the same file exist in the destination library before upload.

SPSite site = new SPSite(”http://mysharepointsite”);
SPWeb web = site.OpenWeb();
web.AllowUnsafeUpdates = true; // i always add this in to prevent security errors
Stream fStream = postedFile.InputStream;
byte[] contents = new byte[fStream.Length];
fStream.Read(contents, 0, (int)fStream.Length);
fStream.Close();
string [...]

Update Filename or List Item name programmatically in SharePoint/WSS

As simple as it sounds, it ain’t simple.
you would of thought the following would work:

SPFile file = web.GetFile(strUrl);
file.name = “mynameFilename.txt”;
file.Update();

does not compute..
There are 2 ways I’ve found of accomplishing this:
1. using the SPFile.MoveTo method:

string strUrl = “http://mysharepointsite/myolddocumentlibrary/Filename.txt”;
string newFileUrl = “http://mysharepointsite/mynewdocumentlibrary/mynewFilename.txt”;

SPSite site = new SPSite(”http://mysharepointsite”);
SPWeb web = site.OpenWeb();
web.AllowUnsafeUpdates = true; // this will stop it from erroring out due to [...]

WSS 3.0: Deleted Config LDF file - no backups, now what?

Well guys, i just had the pleasure of deleting the LDF database file for my WSS 3.0 dev site.
Why? The server had literally 0.99MB of hard disk space and out of desperation, i deleted the 7GB log file by stopping the sql service and deleting the LDF file - i know, i wasn’t thinking straight…
Anyway, SQL went into [...]

SharePoint application logs massive!!

SharePoint application logs massive!!

After doing some development/webpart work on our sharepoint server, the log file to grew to 3.5GB - we have 0.99MB of free space of a 20GB disk (this is a dev/test Virtual server).
Anyway after searching, i came across this blog: http://blogs.vertigo.com/personal/steventap/Blog/archive/2007/01/19/managing-sharepoint-2007-moss-application-log-size.aspx - thanks Steven!
Apparently you can manage how SharePoint logs it’s events:
The Problem:
SharePoint 2007 by default stores 48 hours worth of [...]

Sharepoint - Unknown Error has occurred

I too have dreaded this error - it means nothing to me and just pisses me off especially when developing webparts.
You can remove this by opening the web.config,
Search for <customErrors mode=“On“ /> and change it to <customErrors mode=“Off“ />
To see the call stack and trace information. Find
<SafeMode MaxControls=“200” CallStack=“false” DirectFileDependencies=“10” TotalFileDependencies=“50” AllowPageLevelTrace=“false“>
and change the value of [...]

Backing Up Sharepoint & ZIP (compress)

Hi All,
I want to publish the backup script i use to backup sharepoint every night. It is a very basic BATCH script (.bat) which uses STSADM sharepoint command line tool to backup sharepoint then uses winrar to zip and compress the file in date format then copy to the destination drive. 

# setting a the variable stsadm as the [...]

Sharepoint - EventID: 17137

Sharepoint - EventID: 17137

You recieve the event (17137) in the eventlog when you migrate the databases to a different disk or partition (in this case i moved it to a different partition).
The description for Event ID ( 17137 ) in Source ( MSSQL$MICROSOFT##SSEE ) cannot be found. The local computer may not have the necessary registry information or message DLL [...]