Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.
Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.

Development

Say Happy Birthday with Code!

Most people just say “Happy Birthday” to each other over social networks like Facebook and Twitter with the same 14 predictable letters.   Why not say it with code?   If you’re a developer you already understand.  

Smile

   Before you ask … Yes, I really did write and run the QBasic 4.5 version in 16-bit mode running www.DosBox.com on Windows 7 x64.   Oh, and no it’s not my birthday.

 

With PowerShell

With C# Console Application

With JavaScript

With Command Prompt

With QBasic 4.5  (oh yes I did!)

 

image
image
image
image

An Unhandled exception CryptographicException occurred in OWSTIMER.EXE

I recently saw this error while patching SharePoint with a Cumulative Update.   Most people will never see this.  However, you are not most people.  You run Visual Studio. 

Smile

Visual Studio is trying to help us out with an unhandled exception by asking about launching debug.  That’s all well and good but I didn’t write the code and have no plans to change it.

Best way to work with this is to disable the JIT (Just-In-time Debugger) by following a few simple Registry Key changes:  http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/9e6cb3fb-f8fb-4c22-8608-e521e13260ff

 

image

Visual Studio Just-In-Time Debugger

An unhandled exception (‘System.Security.Cryptography.CryptographicException’) occurred in OWSTIMER.EXE [1344]

Programmatically enabling Records Management

Recently I had someone ask about how In-Place Records Management could be enabled in SharePoint 2010 for a given document with C# object model code.  The method ConfigureListForAutoDeclaration() was key to making everything work.  This would allow for easily enabling on many sites all at once.  Below I’ve included C# code and screenshots from the test site where it was enabled.  Please feel free to leave any questions below with a comment.

  • Open site
  • Enable “In-Place Records Management” site collection feature  (da2e115b-07e4-49d9-bb2c-35e93bb9fca9)
  • Open document library
  • Open “Record declaration settings”
  • Enable “Automatic Declaration” with [Microsoft.Office.Policy.dll]
  • Upload test files
  • Confirmed:  see padlock icon and unable to delete document library

 

C# – Visual Studio 2010 Console Application

Add assembly reference to [C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions14ISAPIMicrosoft.Office.Policy.dll]

 

Screenshots

image

DisplayName

Id

Scope

RecordResource

5bccb9a4-b903-4fd1-8620-b795fa33c9ba

Site

RecordsManagement

6d127338-5e7d-4391-8f62-a11e43b1d404

Farm

InPlaceRecords

da2e115b-07e4-49d9-bb2c-35e93bb9fca9

Site

RecordsCenter

e0a45587-1069-46bd-bf05-8c8db8620b08

Web

image
image
image
image
image

Best of SharePoint 2010 VSIX

The more I learn about Visual Studio 2010 the more I like it. For SharePoint developers, it is great to finally have a mature toolset. To make that experience even better the community has created several VSIX extensions as a “quick start” to more easily jump into various project types. Below I outline links to the VSIX extensions I am aware of and run locally. If you have any questions or suggestions please leave a comment.  Cheers!  

Smile

 

image

 

CKS:DEV – Community Kit for SharePoint: Development Tools

http://cksdev.codeplex.com/

SharePoint Foundation 2010 version and SharePoint Server 2010 version

WSPBuilder conversion tool (WCT) beta

Improved Quick Deploy

Keyboard shortcuts

Updated Full Trust Proxy SPI

Restart processes menus

Attach to processes menus

Solution level Package all

Improved import Content Types

Branding SPI

Improved Fluent visual web part SPI

Basic service application SPI

WCF service SPI

SharePoint PowerShell cmdlet SPI

SharePoint PowerShell pipe binding SPI

Improved copy assembly name menu

SharePoint 2010 Extensibility Projects

http://archive.msdn.microsoft.com/vsixforsp/

  • Silverlight and SharePoint project template
  • SharePoint Ribbon project template
  • OBA Deployment project template

Visual Studio 2010 SharePoint Power Tools

http://visualstudiogallery.msdn.microsoft.com/8e602a8c-6714-4549-9e95-f3700344b0d9

  • Sandboxed-compatible Visual Web Part
  • Sandboxed Compilation

Silverlight SharePoint Web Parts

http://visualstudiogallery.msdn.microsoft.com/e8360a85-58ca-42d1-8de0-e48a1ab071c7

  • Silverlight Web Part
  • Silverlight Custom Web Part

SharePoint 2010 Timer Job

http://visualstudiogallery.msdn.microsoft.com/ab2b2d63-de37-4f63-b4b0-442f80b59b00

SharePoint 2010 Console Application

http://blah.winsmarts.com/2011-2-SharePoint_2010_Console_App,_Project_Template.aspx

LINQ to SharePoint DSL Extension for Visual Studio 2010

linq2spdsl

© Copyright 2016
@ SPJeff

Return to Top ▲Return to Top ▲