Thursday, July 29, 2010

Colors are the Key to Asthetic Appeal

I found a great color chart at http://cloford.com/resources/colours/500col.htm to help me with the look/feel of websites.

Monday, July 19, 2010

Upgrading an Existing SharePoint Solution Package

If I already have a solution installed on SharePoint 2007 but I need to quickly upgrade it then I run the following script.

stsadm -o upgradesolution -filename mySolution.wsp -name mySolution.wsp -immediate -allowgacdeployment
stsadm -o execadmsvcjobs
stsadm.exe -o copyappbincontent
stsadm -o execadmsvcjobs


Note: replace "mySolution" with the solution's actual name.

Thursday, July 8, 2010

Post-Build Event Script in Visual Studio

When doing SharePoint development its good to choose on-the-fly whether I want to compile for the sake of making sure my code is compilable or to verify that my code deploys/activates successfully to a website. To accomplish this I've created a Post-Build Event script for my project as follows.


if $(ConfigurationName) == Debug GOTO DoDebugSkip
DEL "$(TargetDir)$(ProjectName).wsp"
"C:\Program Files\WSPTools\WSPBuilderExtensions\WspBuilder" -SolutionPath "$(ProjectDir)" -OutputPath "$(TargetDir)"

ECHO ON
call "c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
gacutil /u $(ProjectName).dll
gacutil /i $(TargetDir)$(ProjectName).dll
@set PATH=C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN;%PATH%

stsadm -o deactivatefeature -filename $(ProjectName)\Feature.xml -url http://localhost/
stsadm -o execadmsvcjobs
stsadm -o retractsolution -name "$(ProjectName).wsp" -allcontenturls -immediate
stsadm -o execadmsvcjobs
stsadm -o deletesolution -name "$(ProjectName).wsp" -override
stsadm -o execadmsvcjobs

stsadm -o addsolution -filename "$(ProjectName).wsp"
stsadm -o execadmsvcjobs
stsadm -o deploysolution -name "$(ProjectName).wsp" -url http://localhost -immediate -allowGacDeployment -allowCasPolicies -force
stsadm -o execadmsvcjobs
stsadm -o activatefeature -filename $(ProjectName)\Feature.xml -url http://localhost/
stsadm -o execadmsvcjobs
stsadm –o copyappbincontent
stsadm -o execadmsvcjobs

iisreset
:DoDebugSkip

Monday, June 28, 2010

HRESULT: 0x80040E14

When attempting to add content to a List we got the following error "Exception from HRESULT: 0x80040E14". This error may occur when the file system on the data tier has run out of space. I used mstsc.exe to login to the server running SQL Server for this SharePoint farm and discovered there was only 500K left on the 40 gig C: drive. In SQL Server Management Studio I found the chief culprits were two log files hogging up approx. 23 gig and confirmed the files' location/sizes on the C: drive. I truncated both of them, this C: drive now has over 23 gig of free space, and this resolved the issue. Here's the command I used for truncating one of these log files.

USE SharePoint_Config
GO
ALTER DATABASE SharePoint_Config Set Recovery Simple
GO
ALTER DATABASE SharePoint_Config Set Recovery Full
GO
DBCC SHRINKFILE('SharePoint_Config_log', 2)
GO

Wednesday, November 18, 2009

Workflow for Sharepoint 2010

TFS 2010 and Sharepoint 2010 are quickly headed towards purchase and adoption by IT organizations of enterprises all over the globe. I'm determined to get up-to-speed on any changes to the Sharepoint Workflow functionality. I found a collection of videos at http://msdn.microsoft.com/en-us/sharepoint/ee513154.aspx to help techies get up-to-speed. However it takes 22+ minutes to watch all 5 videos so I planned an approach that should work in grasping all this new info. Here are my steps.

(1) See http://msdn.microsoft.com/en-us/library/ee537015(office.14).aspx for the latest in Workflow features for Sharepoint 2010.

(2) Go to http://msdn.microsoft.com/en-us/sharepoint/ee513154.aspx and click on the "Test your skills" button to really learn the main ideas to grasp.

(3) look at the code snippets at http://blogs.msdn.com/pandrew/pages/GettingStarted2010Snippets7.aspx,

(4) speed read through Paul Andrew's http://msdn.microsoft.com/en-us/magazine/ee335710.aspx article.

(5) Plan to return to http://msdn.microsoft.com/en-us/sharepoint/ee513154.aspx with your earphones during your lunch break to watch these videos.

And finally ....
(6) repeat steps 1-4 more carefully in order that you master the material.

A similar approach could be taken with the other 9 modules at http://msdn.microsoft.com/en-us/sharepoint/ee513147.aspx for getting up-to-speed on the Sharepoint 2010 platform.

Wednesday, July 22, 2009

ExecAdmSusJob

The ExecAdmSusJob command of the StsAdm utility is important to use in your Sharepoint deployment batch files.

Tuesday, April 21, 2009

MS-DOS script to remove a SharePoint solution

If you have a SharePoint solution (i.e. .WSP) that you'd like to remove then you could build a 4-step script to run in a MS-DOS script as follows. Just substitute the name of your .wsp file in both places here where it says MySolution.wsp.


"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o retractsolution -name MySolution.wsp -immediate -allcontenturls

"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o execadmsvcjobs

"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deletesolution -name MySolution.wsp -override

"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o execadmsvcjobs