SPSVB 2014 – Visual Studio 2013 for ALM and SharePoint


Click image for PowerPoint

Visual Studio 2013 is a monumental leap forward for Microsoft development. There are so many useful enhancements and features that each could be their own session. This session will give an overview of the new features then focus on those related to Application Lifecycle Management, Mobile, Team Foundation Server 2013, and SharePoint. From project planning, to mobile testing, to inline enhancements from CodeLens, this session will show developers and team leads why Visual Studio 2013 is worth upgrading to immediately!

SharePoint Developer Tips #3

SharePoint Developer Tips #2 and SharePoint Developer Tips #1

SPPersistedObject Class

The SPPersistedObject class provides a base class for all administration objects. It serializes all fields marked with the Persisted attribute to XML and writes the XML blob to the configuration database. The SPPersistedObject class contains code to serialize all its members that are base types, other persisted objects, and collections of persisted objects. Configuration data that is stored in persisted objects is automatically made available to every process on every server in the farm. – MSDN

That’s the technical definition but Charlie Holland says it much better here with a great code example as well. Add this to your SharePoint developer bag of tricks.


Web Parts verbs are interactive user interface (UI) elements that are displayed in a menu or title bar of a Web Parts control. A Web Parts zone provides to a Web Parts control a standard set of verbs that are rendered in the Web Parts verb menu. A custom Web Parts zone or a Web Parts control can add additional verbs to this menu.

ASP.NET provides several standard verbs by default to all controls in a Web Parts zone, including the close and minimize verbs. There are standard verbs for opening, closing, editing, and minimizing a control, and other verbs for exporting a definition for the control or loading a Help file. – MSDN

Donut Caching
This has been around for many years but seems to be a relatively unknown feature. Scott Guthrie says it best:

Output Cache Substitution – This nifty feature enables you to implement what I sometimes call “donut caching” — where you output cache everything on a page except for a few dynamic regions that are contained within cached regions. This enables you to implement full page output caching more aggressively, and not have to split your pages into multiple .ascx user control files to order to implement partial page caching. – http://weblogs.asp.net/scottgu

Full article with code here: http://weblogs.asp.net/scottgu/archive/2006/11/28/tip-trick-implement-donut-caching-with-the-asp-net-2-0-output-cache-substitution-feature.aspx

Tim Ferro

New SharePoint 2013 Event Receiver: SPSecurityEventReceiver

I had heard about a new server side event receiver for SharePoint 2013 about a year ago, and since I finally got around to updating my SharePoint 2010 Event Receivers talk to now include 2013 data, I began looking into all the new changes. Side note: the biggest change is actually Remote Event Receivers but that is for the App Model and not a server side change. On the server side; however, there appears to be only one: SPSecurityEventReceiver. There is not a lot of data out there currently about this but it has some great functionality. Below is an overview of the important data from the Microsoft MSDN site. Please comment if you have seen any good use examples or links to more documentation!

SPSecurityEventReceiver Class

Source: http://msdn.microsoft.com/en-us/library/sharepoint/microsoft.sharepoint.spsecurityeventreceiver.aspx

  • GroupAdded – Specifies an event that occurs after a security group is added.
  • GroupAdding – Specifies an event that occurs before a security group is added.
  • GroupDeleted – Specifies an event that occurs after a security group is deleted.
  • GroupDeleting – Specifies an event that occurs before a security group is deleted.
  • GroupUpdated – Specifies an event that occurs after a security group is updated.
  • GroupUpdating – Specifies an event that occurs before a security group is updated.
  • GroupUserAdded – Specifies an event that occurs after a user is added to a security group.
  • GroupUserAdding – Specifies an event that occurs before a user is added to a security group.
  • GroupUserDeleted – Specifies an event that occurs after a user is deleted from a security group.
  • GroupUserDeleting – Specifies an event that occurs before a user is deleted from a security group.
  • InheritanceBreaking – Specifies an event that occurs before an inheritance is broken.
  • InheritanceBroken – Specifies an event that occurs after an inheritance is broken.
  • InheritanceReset – Specifies an event that occurs after the role inheritance is restored.
  • InheritanceResetting – Specifies an event that occurs before the role inheritance is restored.
  • RoleAssignmentAdded – Specifies an event that occurs after a role assignment is added.
  • RoleAssignmentAdding – Specifies an event that occurs before a role assignment is added.
  • RoleAssignmentDeleted – Specifies an event that occurs after a role assignment is deleted.
  • RoleAssignmentDeleting – Specifies an event that occurs before a role assignment is deleted.
  • RoleDefinitionAdded – Specifies an event that occurs after a role definition is added.
  • RoleDefinitionAdding – Specifies an event that occurs before a role definition is added.
  • RoleDefinitionDeleted – Specifies an event that occurs after a role definition is deleted.
  • RoleDefinitionDeleting – Specifies an event that occurs before a role definition is deleted.
  • RoleDefinitionUpdated – Specifies an event that occurs after a role definition is updated.
  • RoleDefinitionUpdating – Specifies an event that occurs before a role definition is updated.

Source: http://msdn.microsoft.com/en-us/library/sharepoint/microsoft.sharepoint.spsecurityeventreceiver_members.aspxTim Ferro

Ghost in the Wires by Kevin Mitnick is Fascinating

Ghost in the Wires: My Adventures as the World's Most Wanted HackerTo all my friends in the technology field, this book is a must read. It was incredibly fascinating and I couldn’t stop reading (actually I listened to the audio book in my car but you get the idea)! My description of this book would not do it justice so here is the Amazon.com Book Description.

Kevin Mitnick was the most elusive computer break-in artist in history. He accessed computers and networks at the world’s biggest companies–and however fast the authorities were, Mitnick was faster, sprinting through phone switches, computer systems, and cellular networks. He spent years skipping through cyberspace, always three steps ahead and labeled unstoppable. But for Kevin, hacking wasn’t just about technological feats-it was an old fashioned confidence game that required guile and deception to trick the unwitting out of valuable information.

Driven by a powerful urge to accomplish the impossible, Mitnick bypassed security systems and blazed into major organizations including Motorola, Sun Microsystems, and Pacific Bell. But as the FBI’s net began to tighten, Kevin went on the run, engaging in an increasingly sophisticated cat and mouse game that led through false identities, a host of cities, plenty of close shaves, and an ultimate showdown with the Feds, who would stop at nothing to bring him down.

Ghost in the Wires is a thrilling true story of intrigue, suspense, and unbelievable escape, and a portrait of a visionary whose creativity, skills, and persistence forced the authorities to rethink the way they pursued him, inspiring ripples that brought permanent changes in the way people and companies protect their most sensitive information. Amazon.com

Tim Ferro

Visual Studio 2013, TFS 2013, and CodeLens

Source: http://channel9.msdn.com/Shows/Visual-Studio-Toolbox/Visual-Studio-2013-Preview

I cannot remember the last time I saw enhancements to Visual Studio that made me think “Wow that’s amazing”, but this video from Microsoft’s Channel 9 showing off the enhancements to Visual Studio 2013 and Team Foundation Server (TFS) 2013 made me think that! I embedded the video but honestly you should click the above link, go to the site, read the blurb, and watch the video. There are so many great enhancements that I wouldn’t be able to do them justice trying to explain them all. This video is a MUST WATCH for all Microsoft developers.

Of all the improvements, my favorite is the new CodeLens feature.

“Understanding what a line of code does is only part of your challenge as a developer. You must also understand its history, who worked on it, what code references it, and more. This becomes especially challenging in team-oriented projects. CodeLens (Code Information Indicators) in Visual Studio 2013 Preview uses information from both your project metadata and Team Foundation Server 2013 preview to place decorators on each of the methods in your code that show information such as what changesets led to the creation or recent change, who was the last person to work on the code, what unit tests cover the method (including the latest pass/fail state), and what code references exist. You can also quickly jump into that data, such as an associated changeset or referenced code file with just a click.”

Source: http://www.microsoft.com/visualstudio/eng#2013-preview+story-2013preview

To watch just the CodeLens part of the video, use this link: http://channel9.msdn.com/Shows/Visual-Studio-Toolbox/Visual-Studio-2013-Preview#time=17m00s

Tim Ferro

SharePoint 2010 Issue With Trusted Identity Provider and People Picker

Scenario: You are running a SharePoint 2010 Farm patched to Service Pack 1 (SP1). You install a Trusted Identity Provider (TIP) but the Provider and Claims do not show up in the People Picker. Installation went fine and you can authenticate with a user who’s claims have been issued by the TIP; however, you cannot find users or claims via the People Picker. It is not known when this issue started showing up prior to SP1, because it appears to have worked after RTM; I can only confirm (from both talking to other SharePoint experts and repeated testing) it is definitely an SP1 issue.

Solution: Install a SharePoint 2010 Cumulative Update (CU) on top of SP1. In my specific instance SP1 was rolled into the SharePoint 2010 installation ISO but no CUs were installed after. I have solved my issue by installing either the June 2012 CU or the December 2012 CU. Detailed results below.

Thank you to Danny Jessee (@dannyjessee) for helping diagnose and solve this issue.

Image 1: Central Admin screen shot showing patch level. ​14.0.6029.1000 is Service Pack 1 (SP1). Note: It was bundled in the installation ISO and not all running services are shown.

Image 2: Web Application Authentication Selection page in Central Admin. No Trusted Identity Providers are currently defined.

Image 3: Created a custom Win Form to register my custom Security Token Service. Based on this Microsoft article and this blog from Liam Cleary.

Image 4: I ran through both previous articles and registered my STS using both Powershell and a custom Win Form. In both cases I still had to manually upload my certificate even though it should have been done automatically via code or script.

Image 5: Now my custom TIP is registered with SharePoint and I have selected it for my Claims Based Web Application.

Image 6: SharePoint 2010 Sign In Selection Options. I chose STSWebSiteForSharePoint.

Image 7: I am now authenticated via my custom TIP and STS.

Image 8: Finally the issue appears. Note the absence of users and claims from the TIP. Also note that the user which I am logged in as does not show in the results.

Image 9: I have now installed the SharePoint 2010 December 2012 Cumulative Update.

Image 10: SharePoint People Picker working correctly!

SharePoint Podcast: MOSS Gone Wild Review

As part of my August “Little Things” post, I listened to all 5 podcasts from MOSS Gone Wild. They were incredibly insightful and immediately helpful. Through the 5 podcasts, I learned a good number of helpful and important tidbits of information. Whether you administer or develop for SharePoint, these podcasts are for you. Even though they are slightly out of date (the last podcast was released about a year ago), they lay a great foundation for MOSS 2007. You can download the podcasts from either their website or through iTunes. If anyone knows why they stopped making these podcasts or if they are making another one, please let me know. If anyone has any other podcasts that they recommend, please leave a comment with a link.

Tim Ferro

The Last 10 Books I’ve Read

I came across this blog post the other day and it inspired me to write about some recent books that I have read. I recommend them all and hope that you will enjoy them as much as I have. Comment with your thoughts!

Closing TimeClosing Time by Joseph Heller – I am currently reading this amazing sequel to Catch-22. I first learned about this book a number of years ago but I decided to reread Catch-22 to make sure I remembered everything. I incorrectly assumed that the story would pick right up after the ending of the first book, but it did not. It actually takes place about 40 years later and is not solely based around the main character. The book is wonderful and Heller’s style, descriptions, and storytelling is the same as the first. This is a must read if you liked Catch-22.

Catch-22Catch-22 by Joseph Heller -This is my all time favorite book. Rereading it was even better the second time around. I noticed a greater depth to the story and appreciated Heller’s style even more. This is arguably the best novel of the 20th century and a must read if you have not already.

Confessions of a Street AddictConfessions of a Street Addict by James J. Cramer – I decided to read Jim Cramer’s autobiography after reading 3 of his other books. He has an electric personality and a fantastic and interesting life. Jim faced incredible odds all his life and has come out on top. A true tale of perseverance. If you want to know about the real man behind CNBC‘s “Mad Money“, this book is for you.

Real MoneyMad MoneyStay Mad for LifeReal Money by James J. Cramer
Mad Money by James J. Cramer
Stay Mad for Life by James J. Cramer

I am grouping these 3 books together so that I can talk about them in a fluid manner. I read the last book first, not knowing that I would like it enough to read the other 2. The 3rd book is about more than just investing in stocks, it discusses all types of investments from mutual funds to bonds. It is incredibly informative and I have loaned it out numerous times to friends and family. This is a must read for everyone since all of you have investments and retirement accounts. If not, read this and start one.

The first book, Real Money, and it’s sequel, Mad Money, are all about how to pick and invest in stocks. They offer solid investment advice and an incredibly deep understanding of how “the market” works. Cramer has a great, easy to understand style of writing that is intuitive and informative. I can’t wait for the next book.

Brazen CareeristBrazen Careerist by Penelope Trunk – This book is a fresh and real look at the modern work environment. I read this book after being invited to become a blogger for the Brazen Careerist website. That website, her blog, and this book are great resources for Generation Y. I recommend you check out all 3.

The Cosmic BurritoThe Cosmic Burrito by David Shiffman – What a trippy escape. Reading this was a nice relaxing time. The cross country trip taken by 2 unique friends, made for a great ride. This book is so much more than the search for a great burrito. It is about life, existence, and soul. Read this if you are in college now, a recent graduate, or you just want an awesome read.

Arkham AsylumArkham Asylum by Grant Morrison and Dave McKean – My favorite graphic novel of all time. This story blurs the line between sanity and insanity. Arkham is overwhelming to Batman, and in my favorite scene, he stabs himself through the hand with a piece of broken glass. A must read for Batman fans, but an interesting read in its own right.

The Cathedral and the BazaarThe Cathedral and the Bazaar by Eric S. Raymond – For open source and Linux geeks like myself, this was an incredibly interesting read about the origins of a number of open source software. But this is more than that, it’s a motivating experience to continue furthering the open source movement.

Tim Ferro