Posts

Showing posts with the label CAF

SharePoint 2010 / MSOCAF - Use the Anti-XSS library to properly encode the data before rendering it

If you have the following error: Use the Anti-XSS library to properly encode the data before rendering it You will need to visit the Microsoft Download Center and download and install, at least, AntiXSS Library v4.2, from http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=28589 . In your solution, you will need to add the reference, for AntiXSSLibrary, located wherever it was installed, in my system, at "C:\Program Files (x86)\Microsoft Information Security\AntiXSS Library v4.2\NET35\AntiXSSLibrary.dll". using Microsoft.Security.Application; // AntiXSS.HtmlEncode, has been recently deprecated. string strProperty = Encoder.HtmlEncode(Request["Property"]);

SharePoint 2010 - MSOCAF Prep Script

When operating on a hosted or Office 365 Dedicated (including BPOS-D) environment, you will need to utilize MSOCAF to both validate your code, do a test deployment, and submit to Microsoft. With the following cmdlet, you’ll need to set two environmental variables, CAF_ANALYSIS_ROOT_PATH, CAF_SHORTCUT_PATH. Basically, this MSOCAF cmdlet, allows you to simplify the process of testing individual solutions during your development cycle. This cmdlet will copy the files to the necessary location and launch MSOCAF directly. @echo off SET WSP=SolutionName.wsp SET PDB=SolutionName.pdb SET CAF_ANALYSIS_ROOT_PATH=%CAF_ANALYSIS_ROOT_PATH% SET CAF_SHORTCUT_PATH=%CAF_SHORTCUT_PATH% @echo on @echo. cls @echo. @echo Clearing Solutions artifacts folder… rmdir /s /q %CAF_ANALYSIS_ROOT_PATH%”\Caf Reports” rmdir /s /q %CAF_ANALYSIS_ROOT_PATH%”\Solutions artifacts\” md %CAF_ANALYSIS_ROOT_PATH%”\Solutions artifacts\” REM del /q %CAF_ANALYSIS_ROOT_PATH%”\Solutions artifacts\*.*” @echo. @echo Copying fil...

SharePoint 2010 - Deploy Script

This script allows you to to deploy to your on-premise SharePoint farm or local VM with relative ease. Unless, you want to use powershell. @echo off SET WSP=SolutionName.wsp SET URL=http://SharePointServer @set PATH=C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN;%PATH% @echo on @echo. cls @echo. @echo Begin deploying %WSP% @echo. @echo display solution stsadm -o displaysolution -name %WSP% @echo schedule the retraction of the solution stsadm -o retractsolution -name %WSP% -immediate -url %URL% @echo execute the retraction timer job immediately stsadm -o execadmsvcjobs @echo delete the solution from the solution store stsadm -o deletesolution -name %WSP% @echo add the solution to the solution store stsadm -o addsolution -filename DeploymentFiles\%WSP% @echo schedule the deployment of the solution stsadm -o deploysolution -name %WSP% -immediate -allowgacdeployment -force -url %URL% @echo execute the deployment timer job immediatelystsadm -o execadmsv...