SPC14 Survival and Readiness Guide

Wow, the SharePoint 2014 Conference in Las Vegas is almost here and this year’s conference is sure to be another great one! I’m so excited to see old friends again and to make new ones! I’ve been attending Microsoft Conferences for several years (since PDC 2005) and as with any conference, it’s always best to be prepared. And prepping for a conference of this size can be a bit overwhelming. So, back by popular demand (for the third time!) I’ve put together a comprehensive SPC14 Survival and Readiness Guide to offer some tips I’ve learned over the years to help make your experience more productive and enjoyable.

IMPORTANT: as in previous conference survival posts, I’ll periodically update this page with latest information and incoming suggestions as we approach the conference date so be sure to return here from time to time to get the latest info!

Also, I’ll be sporting my custom @SPHotShot twitter tag plate on my conference badge so look for me and say hello!

What Are Your Goals?

It’s important to think about what you want to accomplish while at the conference, so planning ahead makes you much more likely to accomplish your goals:

  • Looking to network with other professionals? Then don’t be shy. Talk to everyone you can. You’ll be surprised what tidbit you’ll pick up from others just by having a short conversation! Also, don’t forget to bring lots of business cards.
  • Looking to learn new and emerging technologies? You’re definitely in luck! You’ll see a collection of well-rounded (and some somewhat bleeding-edge) sessions and demos that focus on the latest and greatest of Microsoft products and services, so this conference should meet or exceed expectations in this area. Also, don’t get stressed out about choosing between two or more sessions that may occur at the same time. As in all past SPC conferences, expect to see Microsoft post full session videos after the conference.
  • Looking to find out about vendor services? The exhibit hall will be filled with top-shelf vendors as well as Microsoft reps who are more than happy to demo their products and answer questions. Also, smart vendors will be staffing their booths with top talent so take time to visit all of them.

Jeff Shuey has written a great article on Eight Tips for Trade Show Success. It’s worth the read!

Before You Arrive ..

  • Create or Update your MySPC and Attendee Profile - For connecting with other people, it’s important to make sure to update your profile data.  Be sure to include what you typically do with SharePoint and what you want to accomplish while at the conference.  If available, upload a (recognizable) picture of yourself so that others will make the connection when they see you. While you’re at it, update your other social profile pics too.
  • Set your schedule on MySPC - Use the MySPC page to set your schedule. This will help the SPC organizers ensure adequate capacity for sessions.  You aren’t required to go a session that you schedule, but it will help you plan ahead of time (you may discover that you chose two consecutive sessions that are across the conference building from each other). For now, you can search and browse using the session database or download an XLS of all sessions for easier browsing.
  • RSVP for Parties – There are sure to be many this year (several on some nights).  Most require that you RSVP or stop by a booth so be sure to look into this before hand. NOTE: in years past, vendors announced their parties publicly (via Twitter and other social media) but they encountered overwhelming responses and wound up leaving out some actual customers. They have since wised up so you should expect that for this year (and going forward), party invitations will be closely guarded to ensure that customers taken care of first (the AvePoint Red Party is a good example). Also, this year Joel is managing info and links regarding non-vendor social events on his blog, so I wont be doing my usual ‘Conference Connections’ page. If you plan to bring your spouse of S.O., here’s a link to search for Vegas events.
  • Logistics - It’s good to have copies of all reservations at your point of check-in in the event of any confusion, and it’s wise to secure ground transportation ahead of time. Taking a taxi can be costly but drivers often know about good places to eat or what other happenings they are aware of during your stay.
  • Pre-Plan Space for Conference Swag - You are going to end up with a lot of conference ‘stuff’ (product information sheets, T-shirts and other goofy swag).  Be sure to allocate extra room in your bag to get it all back home.  Don’t put yourself in the inconvenient position of either having to hand-carry them onto the plane, leaving it behind, or being forced to ship it home (I had to do this for SPC09 as I was simply overwhelmed with swag!).

Conference Essentials: Social Connectivity

  • Communication Device(s) (e.g. – Laptop, Notebook, Tablet, Phone, etc.) - You’ll want to think about which type of connected device you want to carry around based on how you intend to use it.  And don’t forget chargers for all devices you may bring (extra batteries too if you are able). Also, it’s always a good tip to bring a compact power strip; it’s one of the fastest ways to make new friends (“Hey, mind if I borrow a power slot?”)
  • Stay Connected - Get your primary device(s) configured to keep up on what’s going on at the conference via Email,  Twitter, Gowalla, FourSquare, or other social application. Being connected also means you’ll find out about any last-minute or spontaneous events that might be happening. In addition, particular sessions may offer incentives for filling out evaluations immediately, so be ready to complete yours at the end of each session you attend. Vendors will also be promoting Twitter posts for entry into specific drawings and give-aways.  Also, keep #SPYAM on your radar for places to watch for conversations and what’s happening. See http://yammer.com/spyam. Additionally, a SPC YouTube channel also exists where past conference videos can be found. More are expected to be added from this conference too.
  • Pre-Configure the #SPC14 search scope in Your Twitter Device - This will help you discover any updates on sessions or events and will keep you connected on what’s happening at the conference. Also tracking the posts for @SPConf will help as well.
  • Cellular Wireless Card - With so many active devices present, wireless networks at conferences are often congested and rarely offer satisfactory network speeds, so possessing a cellular wireless card can offer a real bonus. UPDATE: Michael Holste @ Microsoft assure us that the Wi-Fi issues experienced at SPC12 will not be repeated at SPC14. Let’s hope he’s right!:

spc14-response22

  • Check With Your Local SharePoint User Group - Find out if they are conducting a special event while at SPC.

Other Thoughts ..

  • When checking in at the registration desk, you will get lots of hand outs, some of which will be passes to special events happening during the conference. Keep track of these items as they will not be re-issued if lost. Also, expect to get some sort of backpack. Here’s what we received at SPC12:

spc12-bag

  • Camera - Bring one (or more for backup). Memories are made at conferences like this. But beware: we’ve all heard the expression “What happens in Vegas stays in Vegas”, but this doesn’t apply when you have hoards of camera-carrying geeks taking potentially reputation-changing pics and videos that will last for an eternity.

spc12-redparty

Everyone should realize that managing your online reputation is an important aspect of attending public events where lots of social posts are taking place. A good resource is the Online Reputation Management Guide to learn about what to look for and how to firm up privacy settings. Do this before you head to the conference (or now while you’re thinking about it)!

Another good reason for bring your camera is that you never know who will show up at a party ..

spc12-pam

  • Dress Comfortably - You’ll be walking and standing A LOT! Good shoes and comfortable clothes will leave you with more energy to last for the nighttime events. Also, it’s worthy to note that my foreign friends have commented how much colder venues are in America so plan accordingly if this is a problem for you.
  • Foreign Germs & Hygiene - This isn’t usually something that’s at the forefront of the attendee thoughts, but keep in mind that this is an event where people from all over the world are mingling in rather close quarters and are exchanging as many handshakes as they are conversations. The liberal use of hand sanitizer (and frequent hand-washing) will help you avoid getting an illness from a foreign germ. Also, some vendors will be handing out small Purell bottles so take advantage of this. No sense in having your conference time cut short by an unexpected illness.
  • Bring Cash! - There will be a lot of no-cost events and gatherings, but you might want to join up with others before or after particular conference events. You may encounter issues with foreign (or even domestic) cards. Having cash on hand is always quicker (and always well-received) at busy restaurants and bars, and it’s the preferred medium of exchange for Las Vegas Bail Bondsmen.
  • Pace Yourself - These conferences are known to leave even the best of conference pro’s exhausted. Think you’re gonna survive partying into the wee hours every night without missing the next days sessions? Think again. Plan to choose a few nights to go home early (or at least earlier than most).
  • Post-Party Morning Kit - Unless you booked a suite, Vegas hotels are notorious for furnishing absolutely no amenities (coffee, water, etc.) without a significant up charge to your hotel bill. Keeping snacks, aspirin and water in your hotel room will help you get going in the morning after the inevitable all-night bender.

Whatever you do, don’t let THIS happen to you ..

locked-out

  • Stay Nourished - Eat when you can. Conference food tends to be buffet-quality at best. However, but in the attendee-only areas, MS has always laid out snack and coffee tables in the connecting hall areas. Be sure to grab snacks to munch on later (or bring back to the hotel for a late night snack!). Also, get a good meal before heading out for nightly events and be sure to stay hydrated.

Feel free to comment if you have other suggestions to share!

Mark Freeman @SPHotShot

8 Comments

SPS Austin post-conference report

Wow! What a whirlwind week-end! I don’t usually write a post-mortem article about a SharePoint Saturday event, but SPS-Austin is an exception to the rule, and I believe has set the bar for all SPS events going forward!

Sponsor and Contributor Support
So, where to begin? Naturally, we have to thank the sponsors (of which there were many). It cannot be mentioned enough that these events simply could not take place were it not for the financial and resource commitments of these organizations to the product and community at large. And a very special mention goes out to the many conference associates (‘red shirts’) floating about gleefully answering questions, guiding attendees to their appointed places, and even keeping a few long-winded <grin> speakers from exceeding their session times. On that note, let’s also give a special thanks to the all-star lineup of speakers who shared their knowledge of the platform with attendees and each other. The atmosphere of learning was a very positive one!

Venue
I think it’s safe to say that everyone was unanimous in the feeling that the AT&T center was a top-notch facility to hold a technical event, and the Twitter comments confirm this. The conference rooms were laid out very well (with the semi-circle, progressively elevated seating commonly found in larger university settings) and the A/V services were excellent (dual projectors and good audio arrangements). Too bad the sessions were not video-taped, but it’s understood that would be cost-prohibitive. Also, the WiFi service was excellent throughout the facility and the catered food services were on par with those found only at vendor conferences.

Logistics
Overall, despite a number of last-minute session updates (due to weather conditions preventing some speakers from attending), the sessions flowed very well. The general layout of the event center certainly contributed to the ease of everyone quickly orienting themselves to the location of session rooms, sponsor booths, dining, and restrooms.

Special Events
The speaker dinner at Salt Lick BBQ was simply awesome, and the ‘refreshments’ were plentiful .. not sure who all participated in the ‘sing-along’ in the back of the bus during the return trip, but just don’t give up your day job. :) During the conference, I and others attended a rather animated Women in SharePoint discussion forum and there was plenty of very interesting (and entertaining) bantering going on! In addition to her usual ‘blunt’ manner of gesture-based communication, Tiffany Songvilay even managed coin a few new ‘terms’ for the women in the community. I can’t mention them here: most are NSFW. :)

Also, Marcy Kellar, Christina Wheeler and others managed to catch some cool shots during the conference so look for those. And Geoff Varosky and Chris Essler managed to pick up some really nice cowboy hats while in Austin (both of which are already modeling these in their twitter pic).

Conclusion
Many, many kudos go out to Jim Bob Howard and Matthew Lathrop for their outstanding efforts in bringing this event together. I suspect many other event organizers are already revisiting how they plan future SPS events in the future. Oh, and let’s not forget to mention the nice weather, an element clearly appreciated by those who traveled from more northward latitudes. :) Lastly, from a personal perspective it was a great pleasure to see old friends and make new ones. This is one reason why I enjoy participating in these events! Hope to see you all again soon!

1 Comment

SharePoint Saturday – Austin Presentation

For attendees at my session “Visualizing Your Data with Mapping Services in SharePoint”, here’s a link to my presentation.

Leave a comment

Houston TechFest Presentation Download

For attendees at my session “Visualizing Your Data with Mapping Services in SharePoint”, here’s a link to my presentation:
https://skydrive.live.com/?cid=dbcd0de4302f6880#cid=DBCD0DE4302F6880&id=DBCD0DE4302F6880%21129

Leave a comment

SharePoint ‘Role’ Definitions And Why They Matter

The time has come for consensus to be reached about the true definition of SharePoint roles. The more pessimistic of you might roll your eyes and think “Oh, we’ve been down this road before“. Other more pragmatic readers might say “There are so many variances to how businesses administer, develop and deploy SharePoint. The definition of a role in one organization might not align well with one of the same name in another organization“. Others may even dismiss this idea with “It really doesn’t matter what you call yourself“. I would very much disagree with all of these statements, and I will explain why. Before I do, I would say that I find it somewhat disheartening that even among the supposed ‘rock stars’ of SharePoint (presumably with a combined experience measured in decades in this platform), there is significant disagreement around the definition of SharePoint roles, often involving discussions sprinkled with a liberal dose of intellectual sparring, bantering, and friendly ribbing (and even a bit of round-robin ass-kissing for good measure). The only consensus I see among these otherwise high-profile peeps is an agreement around “it varies”.

Yes, It Matters

Among many discussions I have read over the last year regarding the meaning and definition of SharePoint roles, Kerri Abraham’s somewhat meandering article stands out. In the article, she asserts that clever administrative updates and configurations (via the UI, SPD, or other admin tool) makes one a ‘sharepoint developer’ merely because a business need was met. While this bold declaration may sit well with Administrators, Designers, and Power Users, I (and many other Developers and Architects) would disagree. This kind of casual merging of (and equally casual agreement with) what should otherwise be distinct roles does no good service to both consumers and providers of the product. There are actually some very important reasons why a strong consensus is needed regarding clearly defined SharePoint roles.

What Am I, Really?

First, clear and defined roles serve well for the aspiring SharePoint professional-in-training. More than most, these technologists need a clear delineation of role definitions so that they may measure self-progress in their mastery of the many ‘hats’ we old-timers wear daily in our varied travels with this technology platform. Ambiguity in role definitions is confusing and impedes a proper self-evaluation of ones own skillsets. Without a clear definition of the activities and responsibilities of each SharePoint role, how would one answer the questions “And I progressing?” and “What role skills do I lack or need to work on?”.

More importantly, role confusion leads to real-world problems for the intermediate (or even advanced) SharePoint specialist. Consider a scenario where “John”, a SharePoint Specialist, has been working with the product for a year or two in a somewhat entry-level administration or design position. He has learned the ins and outs of Central Admin, web page creation, web part configurations, and other UX tasks. Maybe he even dabbles in some advanced configurations using Designer. In performing these activities, he has solved numerous business requests; he feels ‘empowered’ by the technology and is excited about it. So, in the course of searching for answers about various roles, he happens on one or more posts similar to Kerri’s and begins to think “Hey, I’m really a Developer!”. Let’s go further and say that “John” then spots one or more SharePoint Developer job listings, scans through the requirements and thinks “Well, I meet a lot of those requirements; after all, I’m a Developer!” After applying to a number of listings, and assuming he makes the initial cut and lands a technical interview (because HR doesn’t understand role requirements well either), this is where disappointment is sure to greet him. More on this in a bit.

So, Are You In the Market For An “Opportunity”?

How many times have you heard this from a recruiter or an HR representative? Now, I won’t go into a rant about recruiters; that’s not what this article is about. I will say that in my experience there are few recruiters that are really worth dealing with. Experiences with HR personnel tend to be better, and they rightfully deserve more consideration due to the simple fact that they have inside knowledge and a direct link into the organization. However, with both types I see the same issue time and again: confusion regarding the definition of various SharePoint roles (and the skills associated with those roles) and how they apply to a job description.

Specific to calls or emails from recruiters, its bad enough to try to have a conversation that centers around the premise of “I know a guy, who knows a guy who needs a SharePoint [fill in the blank]“, when it comes down to the technical requirements (originating from somewhere deep in HR land) more often than not it’s a loosely defined collection of talking points whose content is common enough to presume that the job writers are merely copying (often bad) generic bullet points from each other. Why does this happen? I suppose there’s a bit of laziness in this, but I what I really suspect is that role definitions are just not clear.

With the HR person, it’s somewhat easier to tease out the real requirements of the job (‘role’). A smart and knowledgable SharePoint professional will quickly spot discrepancies between the job title, it’s summary, and the requirements and will ask specific questions about elements of the job. In my experience, during the course of the conversation I am often delegated to educate the HR person about typical (note, not widely accepted) roles and responsibilities on a SharePoint team; something that is supposed to happen before we talk.

Words Have Meanings

Over the course of my varied career in SharePoint and other technologies, I have conducted scores and scores of technical interviews mostly because I’m just good at it. It’s a talent I stumbled upon and didn’t realize I had. I enjoy it, too. Every interview teaches me something about both the product and how people perceive it and themselves. Now, all of us have pet peeves and one that is near the top of my list during a technical interview is a misrepresentation or misunderstanding of one’s true skill set. As a technical interviewer, I typically deal with fairly well-defined job requirements (that otherwise translate to a ‘role’ within the SharePoint team or organization). However, there are times (when needed)  where I will push back to HR when I see ambiguity in a job description; it does no one any good to have a job position where the title varies from its task requirements.  And quite often the written requirements of a job will contain skills that overlap those of other roles. However, a well-written job posting will contain a solid majority of requirements that are central to one of the primary roles, with others being denoted as optional or ancillary (“they can learn that OTJ, if necessary”).

Returning to “John” and the technical interview, for a good interviewer it would soon become clear that after only a handful of lightly probing questions that “John” is best suited as an admin or designer (maybe even IT Pro) position. The interviewer is now somewhat disappointed (maybe even a little angry at HR for wasting his time on this candidate). And “John” detects that the questions are not aligning to what he thought the job describes. If the interviewer is polite, the questions may then shift to those more suited for a position that “John” is really qualified for. Or if the interviewer is not in a giving mood, the conversation will probably be cut short with a simple (and disheartening) “we’ll be in touch”. Upon conclusion of this stressful exercise, “John” is left somewhat flummoxed and confused. How will he know what went wrong? Chances are, the interviewer won’t tell him unless pressed on it. In this exercise, it becomes clear that roles do have meaning when they are applied to a real-world experience.

What about the recruiter or HR professional? Often, these are people who just don’t know the platform like we do (why should they?) so they often take the path of least resistance to translate what the technical team is telling them in order to get the job description out the door: Google and Bing. What do they find? Maybe some arguing or fighting or even sniping about who is what in a role. What they won’t find is a commonly accepted definition of SharePoint roles. Confusion reigns.

Let me also be clear that I am not talking about a Web Developer, a JQuery Developer, a JavaScript Developer or any number of other skills that compliment those that should already exist for someone working in one or more roles on a SharePoint team. While these activities fall within what would commonly (and often wrongly) be accepted as the ‘SharePoint Developer’ realm, only in rare circumstances would I see them as distinct roles in and of themselves.

Where Do We Begin?

So, what guideposts might we use to aid in clearly defining SharePoint roles as they are inferred by its creator, Microsoft?. We might start by looking at what Microsoft measures on certification exams. Exam 70-576: Designing and Developing Microsoft SharePoint 2010 Applications measures skills such as UX design, application navigation, localization, security, performance and optimization, deployment scenarios, composites and solution sets. Exam 70-573: Microsoft SharePoint 2010, Application Development goes even deeper on subjects including leveraging the API to transform and manipulate practically everything occurring on the platform. There are a few others on configuring and administering SharePoint, but nowhere do I see one where the skills of an administrator (using the UI) or designer (using SP Designer) would measure as a Developer. In fact, just the opposite. According to the measured skills, a Developer must have knowledge not only in Designer but as well as custom code deployments.

Additionally, Microsoft has published a long-standing TechNet article regarding team roles in SharePoint, but the information is very general in nature and falls well short of addressing the issues of role definitions being raised here. As well, one not intimately familiar with the platform may actually come away from this article thinking that a technician performing configuration tasks in Designer is a Developer.

Where Does This Leave Us?

Like many aspects of SharePoint, Microsoft has left numerous areas of the platform to be enhanced, refined or otherwise more clearly defined by third parties and the community at large. What of the need for clear definitions regarding SharePoint Team Roles? It would seem that the MVP community would be an obvious choice to address this matter. According to the MVP site:

MVPs make exceptional contributions to technical communities, sharing their passion, knowledge, and know-how. Meanwhile, because MVPs hear the opinions and needs of many others in the technical community, they are well-placed to share highly focused feedback with Microsoft

Furthermore, for every MVP or other ‘high profile’ SharePoint professional out there professing their views about this or that, there are hundreds if not  thousands of others quietly and effectively solving business challenges by whatever role they wish to (or not) call themselves (all without the fanfare of self-aggrandizing posts and tweets that some are known for). So I would call on those ‘quiet professionals’ to chime into the conversation as well.

So, what say you MVP community? Who cares to step up to the plate?

2 Comments

Elevating Security in SharePoint

In a multi-farm enterprise SharePoint environment, it is often a requirement for service processes to perform activities on behalf of lessor client process that normally do not have the required permission to perform the activity (this is often referred to as ‘impersonation’). Elevation of process permissions is a sensitive operation; it’s important to elevate the process (but NOT the caller) and ensure that the scope of the elevation is strictly limited to the duration required to complete the client request. Below are four proven methods (of varying implementation) for retrieving an administrative user token (based on the availibility of current object instances):

This method constructs an admin token using a instance of SPWeb:

        public new SPUserToken ConstructAdminToken(SPWeb CurrentWeb)
        {
            if (CurrentWeb == null)
                return null;
            return ConstructAdminToken(CurrentWeb.Site);
        }

This method constructs an admin token using the SPSite param passed in. First attempts a resolution using the SPSite instance. If not successfull, then attempts using the Url value of the SPSite

        public SPUserToken ConstructAdminToken(SPSite CurrentSite)
        {
            if (CurrentSite == null)
                return null;
            SPUserToken token = null;

            try
            {
               Guid siteID = CurrentSite.ID;
               CurrentSite.CatchAccessDeniedException = false;
            try
            {
               token = CurrentSite.SystemAccount.UserToken;
            }
            catch (UnauthorizedAccessException)
            {
                SPSecurity.RunWithElevatedPrivileges(delegate
                {
                    using (SPSite site2 = new SPSite(siteID))
                     {
                        token = site2.SystemAccount.UserToken;
                     }
                 });
              }
         }
         catch { token = null; }

            if (token == null)
                token = ConstructAdminToken(CurrentSite.Url);
            return token;
        }
   }

This method constructs an admin token using the current SPContext

public SPUserToken ConstructAdminToken()
{
   SPUserToken token = null;
   string sPMonitoredScopeText = null;
    try
    {
      token = SPContext.Current.Site.SystemAccount.UserToken;
    }
    catch { token = null; }
    return token;
}

This method constructs an admin token using the provided site url. It succeeds only if the calling process meets certain security requirements

        public SPUserToken ConstructAdminToken(string SiteUrl)
        {
            SPUserToken token = null;
            string sPMonitoredScopeText = null;

            if (!string.IsNullOrEmpty(SiteUrl))
            {
                try
                {
                    using (new Microsoft.SharePoint.Utilities.SPMonitoredScope(
                    sPMonitoredScopeText))
                    {
                        SPSecurity.RunWithElevatedPrivileges(delegate
                        {
                            using (SPSite site = new SPSite(SiteUrl))
                            {
                                site.CatchAccessDeniedException = false;
                                token = site.SystemAccount.UserToken;
                            }
                        });
                    }
                 }
                 catch { token = null; }
             }

            return token;
        }

Leave a comment

Determining the current SharePoint edition using C#

At my client, I manage a large collection of SharePoint solutions (features, templates, custom fields, etc.) for their enterprise environment, and for the last 14 months all of these services have been written under the assumption of an exclusively SharePoint Foundation platform. Why Foundation, and not Standard or Enterprise? Long story, but it comes down to licensing fees. When you are dealing with over a hundred thousand users and multiple farms and environments (DEV, QA, PROD, etc.), we’re talking seven digits for total license fees (plus yearly maintenance, yikes!). Simply not in the client’s budget.

How things change, and if there is one constant we soon learn in IT development, it’s change. Now, we are rolling out a separate Enterprise edition farm (with a limited user base). Obviously, most of the current features and solutions will apply to both editions (but specific to Enterprise), but these solutions must now be modified to vary their behaviour based on the current SharePoint edition the process is running within. How to do this? My friends, this is where the magic begins ..

A quick internet search yielded this MSDN article that gives a pointer as to how the current SKU can be resolved, but there are two problems with the example. First, it accesses the registry. Unless you are explicitly elevating the permissions of the current process, attempting access to a protected area of the registry will fail. Second, it doesn’t take into account that multiple SKU items can be present in a SharePoint installation, depending on how the platform was installed and whether it was upgraded (as is the case with our environment).

To address these two concerns, below you will find the correct method for resolving the current SharePoint edition that the code is running within. The magic happens using the Products property of the SPFarm object.

First, I declare an enumeration containing the possible SKU editions:

        public enum SharePointProductEdition
        {
            None = 0,
            SharePointFoundation2010 = 1,
            SharePointServer2010StandardTrial = 2,
            SharePointServer2010Standard = 3,
            SharePointServer2010EnterpriseTrial = 4,
            SharePointServer2010Enterprise = 5
        }

Then the procedure to call:

        public SharePointProductEdition GetSharePointProductEdition
        {            
            get
            {
                SharePointProductEdition retVal = SharePointProductEdition.None;
                try
                {
                    const string sharePointFoundation2010 = "BEED1F75-C398-4447-AEF1-E66E1F0DF91E";
                    const string sharePointServer2010StandardTrial = "B2C0B444-3914-4ACB-A0B8-7CF50A8F7AA0";
                    const string sharePointServer2010Standard = "3FDFBCC8-B3E4-4482-91FA-122C6432805C";
                    const string sharePointServer2010EnterpriseTrial = "88BED06D-8C6B-4E62-AB01-546D6005FE97";
                    const string sharePointServer2010Enterprise = "D5595F62-449B-4061-B0B2-0CBAD410BB51";
                    using (SPSite CurrentSite = new SPSite(CurrentSiteContextUrl))
                    {
                        using (SPWeb CurrentWeb = CurrentSite.OpenWeb())
                        {
                            Microsoft.SharePoint.Administration.SPFarm currentFarm = CurrentWeb.Site.WebApplication.Farm;
                            IEnumerable farmProducts = currentFarm.Products;
                            foreach (Guid prodGuid in farmProducts)
                            {
                                string prodGuidString = prodGuid.ToString().ToUpper();
                                switch (prodGuidString)
                                {
                                    case sharePointFoundation2010:
                                        if (retVal == SharePointProductEdition.None)
                                            retVal = SharePointProductEdition.SharePointFoundation2010;
                                        break;
                                    case sharePointServer2010Enterprise:
                                        return SharePointProductEdition.SharePointServer2010Enterprise;
                                    case sharePointServer2010EnterpriseTrial:
                                        switch (retVal)
                                        {
                                            case SharePointProductEdition.None:
                                            case SharePointProductEdition.SharePointFoundation2010:
                                            case SharePointProductEdition.SharePointServer2010Standard:
                                            case SharePointProductEdition.SharePointServer2010StandardTrial:
                                                retVal = SharePointProductEdition.SharePointServer2010EnterpriseTrial;
                                                break;
                                        }
                                        break;
                                    case sharePointServer2010Standard:
                                        switch (retVal)
                                        {
                                            case SharePointProductEdition.None:
                                            case SharePointProductEdition.SharePointFoundation2010:
                                            case SharePointProductEdition.SharePointServer2010StandardTrial:
                                                retVal = SharePointProductEdition.SharePointServer2010Standard;
                                                break;
                                        }
                                        break;
                                    case sharePointServer2010StandardTrial:
                                        switch (retVal)
                                        {
                                            case SharePointProductEdition.None:
                                            case SharePointProductEdition.SharePointFoundation2010:
                                                retVal = SharePointProductEdition.SharePointServer2010StandardTrial;
                                                break;
                                        }
                                        break;
                                }
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    LogError(ex);
                    return SharePointProductEdition.None;
                }
                return retVal;
            }
        }

As you can see by the code, if multiple editions are discovered the higher one takes precedence (as it should). There you have it, a C# example you can use to split your logical paths based on the current SharePoint edition!

Leave a comment

Follow

Get every new post delivered to your Inbox.