Radi Atanassov

SharePoint MCM, MVP, MCT and owner of OneBit Software

Recompiling your own version of the SharePoint code to suit your needs

Ever been pissed off at the SharePoint code? Banging your head against the wall, trying to figure out why something is not working for you, you're looking at it with a reflection tool and just want to see what would happen if you change a single line of code?

You don't have the SharePoint source code, but you still want to fiddle with it and compile your own build? You might have never thought that is possible, but here in this post I will show you how!

This is by far extremely awesome and some seriously fun shit, so enjoy!

(Disclaimer: don't do this, seriously. Just learn from it. I am sure that reverse engineering is written to be forbidden somewhere. And don't do this anywhere near a production server.)

STEP 1) Get the Reflexil plugin, either in Reflector or Telerik JustDecompile. It is called "Assembly Editor" and is available as a JustDecompile Plugin. Ever since Red Gate basterdised Reflector I prefer Telerik JustDecompile, it is free and built in Sofia, where I live and where OneBit Software is located.

Once you get all the components in there, load your tool and the assembly that you want to fiddle with.

In my example I modify Microsoft.SharePoint.ApplicationPages.Administration.dll, to make the CA UI show that I have a custom build, but you could easily do this with Microsoft.SharePoint.dll or any other assembly.

STEP 2) Browse through the assembly and find the code you want to modify. If you are tweaking a property, you need to specifically select the getter or setter. The UI will look like below, with many tabs in the Reflexil UI:

Right-click and either choose to edit the instruction, or "Replace all with code" for the fun stuff.

STEP 3) You will end up in an interface looking like the one below. On the left you will see generated code, on the right you will see instruction information. In my example, I replaced return default(string); with return "Radi's Custom SP Build!";

Make sure the Compiler version is the one relevant for the assembly, in my case v3.5, and hit Compile. You will get standard compiler errors if you have screwed something up. Otherwise if successful, the Instructions on the right will change as per your modification. That stuff is IL, you might already be familiar.

STEP 4) Go ahead and save your modified assembly. It will prompt you to save it with "Patched" in the filename:

STEP 5) After you save it, Reflexil/Telerik JustDecompiler will tell you some very important stuff about the Strong Name of the assembly. This step is key to get this to work and there's deep theory about assembly signing coming to play.

Assemblies are usually signed with a key so that they don't get tampered with in the way I'm doing it. Unless you have the key you can't modify it and resign it. This is something that Visual Studio does when it builds an assembly.

You can either remove the Strong Name, or register the assembly for verification skipping. This is something you could do with the sn.exe tool, or just through the interface below:

"Register it for verification sipping" requires that "sn.exe" is in the path variable so the tool can call it. It will basically execute:

sn -Vr yourAssembly.dll

I had to add "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\x64" to my Environment PATH variable and restart JustDecompiler. You might want to do this before you edit assemblies so you don't have to do it again. This is what you will see if sn.exe is not found:

 

STEP 6) What you should see next is the patched assembly, but the most important part is the PublicKeyToken, it should not be null:

 

STEP 7) The last step, rename the "Patched" DLL to its original name, then do an IISRESET.

 

And here she is, the most beautiful SharePoint release ever:

Please comment if you like this post!

Slides and Video from my #SPC14 sessions, what a ripper I'm on Channel 9!

So, as you could imagine, #SPC14 was INSANE!!! So much content, amazing sessions, awesome announcements lots of great fun, lots of lost money at the casinos. I am still recovering, trying to get my calendar in order and attending to the endless list of tasks and people to follow-up. I have collected over 100 business cards, many of which are potential business opportunities, and have given out at least 400.

I got really good feedback from my sessions, I am happy, but there is always room for improvement. I was visibly (and audibly) tense in my #AccessServices session (the first one), but the amount of humor and jokes made up for it. A lot of people came up to me and told me they enjoyed it very much and that it was pure comedy. It was engaging, but definitely the amount of people in that session was mind gobbling. Definitely the first time for me speaking in front of 650 people (968 confirmed to attend, many more came, many got rejected because of no room). Overall it was a good session, but I also got some suggestions for improvements. The feedback is always the most important so I will definitely take action.

My talk on Work Management Service was significantly straight forward. It received a really high score, but overall it was not as entertaining as Access. the content was quite flat but unique. No other session at #SPC12 or #SPC14 demonstrates Task Synchronization and the Work Management Service. Many people, including in the feedback, told me they didn't even know it existed. It is very honorable to show something at #SPC14 that people don't know about.

Here are my slides and video:

Access is back! High-value, 'no code', functional & flexible business apps with the new Access services

 Slides:

Video:

My Rating so far:

Evaluation Count 108 
Question: Average Score:
The speaker’s presentation style helped me better understand the material. (5 excellent - 1 poor) 4.46
The speaker was knowledgeable about the subject matter. (5 = high to 1 = low) 4.72
The presentation was effective. (5 = high to 1 = low) 4.33
The demo(s) were effective. (5 excellent - 1 poor) 4.28
Overall satisfaction with this session. (5 = high to 1 = low) 4.39
Overall: 4.436

SharePoint 2013 Work Management Service Deep Dive

slides:

 Video:

My rating so far:

Evaluation Count 27 
Question: Average Score:
The speaker was knowledgeable about the session’s topic. (5 excellent - 1 poor) 4.87
The speaker’s presentation style helped me better understand the material. (5 excellent - 1 poor) 4.39
The presentation was effective source of learning. (5 excellent - 1 poor) 4.61
The demo(s) were effective. (5 excellent - 1 poor) 4.35
Overall satisfaction with this session. (5 excellent - 1 poor) 4.42
Overall: 4.528

(People are evaluating continuously, so numbers may change)

Overall, it was a great pleasure and a great experience. I sincerely hope I have shown someone something new.

Please feel free to contact me and ask me about these things, I would be glad to help. Oh, yes, and if I haven't offended anyone with my jokes, please feel free to come to my next session! 

Day 1 highlights for developers at SPC14

 

The hype here at #SPC14 is absolutely huge. I am extremely excited about so many new things that are announced. I'm going to start keeping track of everything I find interesting and post it, so keep an eye out.

For developers:

 

Office Web Widgets (Preview) - http://www.nuget.org/packages/Microsoft.Office.WebWidgets.Experimental/ Nice components for provider hosted apps. The People Picker is something to check out.

 

Office SDK for Android - https://github.com/OfficeDev - this looks like a repository that the MS Office team will publish dev related stuff. So far the Android SDK is there, but maybe that’s it.

 

SharePoint Workflow Apps - I still need to find a link for this one. Keep an eye for an update.

 

Office 365 Device and website Apps - Same as above. Keep an eye for an update.

 

 

SharePoint 2013 and SharePoint Online solution pack for branding and site provisioning http://www.microsoft.com/en-us/download/details.aspx?id=42030 - Nice, putting this in my reading todo list.

 

Office App Model samples - http://officeams.codeplex.com/ (Blogged by Vesa here: http://blogs.msdn.com/b/vesku/archive/2014/03/03/announcing-office-app-model-samples-codeplex-project.aspx) - Really nice stuff, I saw Steve Walker hit the "publish" button in front of me. That was epic…. I can't wait to find time to check these out

 

There's some other new stuff like O365 Discovery Services & Azure AD OAuth. I still have to get my head around that one.

 

I’m speaking at SPC14 and ESPC14!

It has been a quiet period on blogging, but I have been very active in presentations and conferences. Well… not as active as Joel, Michael and Paul, but still active J

Catch me next at:

The SharePoint Conference 2014 in Las Vega, yeah baby!!!!

Session 1: Access is back! High-value, 'no code', functional & flexible business apps with the new Access services

Microsoft Access 2013 and Access Services 2013 have made a huge step forward... one of the greatest advancements on top of the new SharePoint platform. Anyone can build powerful business solutions in minutes. The new Access 2013 allows you to follow agile development from your business units and remain confident the data is secured, backed up, and managed appropriately. We will look at how you can leverage the SharePoint Apps model and use SQL Azure as a backend database. We, too, will talk about how your legacy Access applications could be brought forward and migrated.

This will be a technical session focused on functionality, capability, process and architecture. There will be 'no code' and we will discuss the rationale of why this should be in your development arsenal.

Date: Tuesday, March 4

Time: 5:00 PM - 6:15 PM

Room: Murano 3201-3303

Session Type: Best Practices

Session Code: SPC301

Audience: IT Professional

Level: 300

Product: Access, Office 365, SharePoint 2013

Tag: 2013, Access, Access Services, Apps, Cloud, On-Premises, Solutions, Tools

Role: Administrator, Application Manager, Database Administrator, IT Architect, Software Architect, Systems Administrator

 

This session currently has 474 attendees confirmed… WOW, just wow!!!

 

Session 2: SharePoint 2013 Work Management Service deep dive

Where do you keep track of all your tasks? Outlook? SharePoint? Maybe Project Server? Storing them across multiple applications is a pure Information Worker challenge. SharePoint 2013 has the new Work Management Service Application to solve these issues. It aggregates tasks across SharePoint, Exchange, Project Server and there's even a story for TFS. There's not that much documentation out there on how to configure it, how to maintain and work with it. In this session I will walk through the architecture and setup, and go over how it operates and what you need to know to keep it alive. I will demonstrate the features and discuss all of the technical aspects.

Date: Wednesday, March 5

Time: 5:00 PM - 6:15 PM

Room: Murano 3201-3303

Session Type: Deep Dive

Session Code: SPC342

Audience: IT Professional

Level: 300

Product: Exchange, Project, SharePoint 2013

Tag: 2013, Architecture, Deployment, On-Premises

 

And…

The European SharePoint Conference 2014 in Barcelona, 5-8th May:

SharePoint 2013 App Authentication

SharePoint 2013 introduces a new App model that is drastically changing the way developers think about and deliver new functionality. This talk is a deep dive on SharePoint 15 App authentication and how it works, how tokens get exchanged and how the communication is secured. We will look at the framework API and architecture, all the various bells and whistles of OAuth and Server-2-Server authentication. This talk is developer oriented and we will spend a lot of time covering the specifics on OAuth authentication & tokens, communication back to SharePoint, the different deployment models, various limitations and how to overcome them and apply them to the real world.

Link: SharePoint 2013 App Authentication

Soon I will also be posting the upcoming local user group sessions. Stay tuned :)

#spc14, #espc14

 

The Fall of the Master

Today the entire MCM/MCA and MCSM community received the sad and utterly disappointing message that all Master & Architect programs will be retired on the 1st of October, 2013.

This is a complete shock to all involved in the community and is by far one of the worst decisions Microsoft has ever done. As an external (to Microsoft) MCM and MCSM, a customer to the program, and what many of my program peers consider a successful  delegate with achieved business results and commercial customer recognition due to the program, I have all the right to publicly announce my disappointment with the person who made this decision and ask for his/her resignation. Hundreds of us have invested their time, money, blood, sweat, nerves, pride and honour, and now it has abruptly been retired for all.

What does this mean for the SharePoint product?

The MCM/MCSM/MCA crew have been long recognised as the best technical field experts in the industry. Maybe not so widely communicated and maybe the message has not been so successful, but the lads and lass of the program have made a difference to the success of the product.

Quite frankly, this is actually a sad, sad day for SharePoint. I know extremely well from experiences, the MCM/MCSM/MCA crew have saved a ridiculous number of failed deployments (no offence to anyone!) and without us this product would have failed embarrassingly in a far too great number of occurrences at key clients that actually fund the product.

What does this mean for customers of SharePoint?

Many customers ask for the skills of MCM/MCSM/MCA… and pay for it. They get good results for the buck, no question asked. There is not one problem we couldn’t fix, not one challenge we couldn’t design for and that’s what we we’re trained for. The actual certificate is not that important here – it is the training and knowledge sharing that matters. There is not one place/program/event/community that I know that offers the collaborative training experience that the training rotation offered. There is no other place in the world, no matter how big the internet is, that offers all of that knowledge collected, systemised, ordered and analysed for the purpose of the better client deployment.

Without this level of training in the future, customers will suffer more failed deployments and essentially Microsoft may suffer a loss in profit. I sincerely believe that you can’t solve many global SharePoint problems/challenges with the training available at the MCP/MCSE/MCSA levels. They are just not deep enough. SharePoint is huge and extremely diverse, so the knowledge matters. Even Microsoft internals are trained at the program. So who’s going to grow stars now?


What about the other programs?

The same story applies. Microsoft just slapped the best in the world. Doesn’t matter if you’re in SharePoint, Exchange, Lync, SQL or Directory, or more than one discipline, it’s a sad day for all.

What does it mean for businesses with MCM/MCSM/MCA specialists?

Well… now there is no way to differentiate the top  of the industry. There might be other certificates or programs to train and recognise, but many partners recognised the Masters and Architects. Many paid a lot for their training and many had a lot of success & return afterwards.

I for one gained significant benefit after passing MCM, I started my own business and currently grow armies of SharePoint developers and infrastructure specialists which assist Microsoft customers and partners (and even Microsoft!) all over the world. A delivery team with a Master is worth much more compared to a delivery team without a Master and many customers hire these services in favour of other nearshore/offshore offerings. Call me commercial, but that’s what I am – I deliver resources and skill set to partners and customers that need it, and the program made me better at it. There are many places in the world that need the MCM/MCSM/MCA difference that it makes.


What would this mean for instructors and managers of the program?

I would imagine you feel disappointed too? You’ve spent so much time to make this all a success for us… and its all gone (I hope you are not made redundant?).

What does this mean to existing MCM/MCSM/MCA?

We’re more tough than you could imagine. For those who have achieved certification, you will always be remembered as the ones who succeeded in the challenge, the original crew. Many of us are hurt (I can see more than 10 emails per hour filled with frustration on the internal DL), but we will continue to be as knowledgeable as we can and act in the best interest for the client. The program has taught us values and practices that will continue to drive product success and adoption.

We’re gonna get some kind of refund, but that won’t cover the disappointment towards Microsoft that the best are feeling at the moment. I guess it’s kind of hard to have the people you recognised as the best to tell you that you suck. If you cared, that is.

What does this mean for people who never had the chance to attend?

There’s a lot of “masters” in the field who didn’t have the chance or just didn’t bother to do this. For those that never had the time or possibility to attend a rotation or pass the exams, you don’t need no certification, we know who you are. The community is mature enough to recognise one another and the impact you have on the success of the product.

And to all MVP’s? think about what it would mean to you if you suddenly receive an email telling you that the MVP program is suddenly retired and within two months your award means nothing anymore. Well guess what, tomorrow that could happen. So have a second thought if you are giving your heart to a company that is changing. Microsoft is no Microsoft anymore.

What does this mean for Microsoft Learning?

YOU FAILED THIS EXAM.. You failed your purpose and your promise to customers. For once YOU get the failed message and not I :) Quite frankly, you damaged the reputation of Microsoft, and you’re probably going to shim off a bit of the share price.

Deploying and debugging SharePoint Apps – Sideloading the easy way

If you try to deploy an App from Visual Studio to anything other than a developer site you will get this error:

“Error occurred in deployment step 'Install app for SharePoint': Sideloading of apps is not enabled on this site.”

This is due to a feature that is not enabled on any other site template apart from the Developer Site. This error will also occur if you are deploying to a host named site collection that is not at the root of the web application. You will also get this when you are deploying to a site in Office 365 that is not a Developer Site.

You might be developing a solution and you may want to deploy it to a site that is not a Developer Site.

To enable this for on-premises environments, run this PowerShell script:


Enable-SPFeature -Identity AE3A1339-61F5-4f8f-81A7-ABD2DA956A7D–url <siteurl>

To enable this on Office 365 sites you should use the client-side object model. Here is an example:

   1: $siteCollectionUrl = ""
   2: $username = ""
   3: $password = ""
   4: [Microsoft.SharePoint.Client.ClientContext]$context = New-Object Microsoft.SharePoint.Client.ClientContext($siteCollectionUrl)
   5: [Microsoft.SharePoint.Client.SharePointOnlineCredentials]$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password)
   6: $context.Credentials = $credentials
   7: $siteCollection = $cc.Site;
   8: $sideLoadingGuid = new-object System.Guid "AE3A1339-61F5-4f8f-81A7-ABD2DA956A7D"
   9: $siteCollection.Features.Add($sideLoadingGuid, $true, [Microsoft.SharePoint.Client.FeatureDefinitionScope]::None);
  10: $context.ExecuteQuery();

The only thing that this feature does is “register” itself as an activated feature on the site. You can check the event receiver, it does nothing but checks.

Here is a piece of the Microsoft SharePoint code that actually checks if sideloading is enabled:

   1:internalstaticbool IsAppSideloadingEnabled(SPSite site)
   2: {
   3:if (site == null)
   4:     {
   5:thrownew ArgumentNullException("site");
   6:     }
   7:return SPDeveloperData.IsDeveloperSite(site) || site.Features[FeatureIds.EnableAppSideLoading] != null;
   8: }

This is performed in the API that VS uses to deploy Apps.

Hope this helps!

My slides from the European SharePoint Conference 2013

So, European SharePoint Conference 2013… lots of fun, lots of friends and an absolute goldmine for business contacts.

My session - Building SharePoint 2013 Apps - Architecture, Authentication & Connectivity API – rolled out a score of 8.2/10. Not bad, I even got a mention that it was in the highest ranking talks.

What I spoke about:

  • A quick technical overview of SharePoint Apps, just to set the scene
  • Why we need to consider Apps
  • How Apps “work” inside of SharePoint – the app domain, IIS and DNS, how the Site Subscription Service and App Management Service come into play and what their role is
  • Authentication – How OAuth works with a neat demo in Fiddler
  • Server-2-Server Authentication – How to set up S2S and how it differs from OAuth
  • Token fun – context, refresh, bearer, access tokens and whatever else I could throw in

http://www.slideshare.net/SharePointRadi/euspc-2013-radiatanassov

Unfortunately I didn’t have time for App licensing and REST/CSOM communication.

Another cool galleons galore step for me – I got recognised as the Top Influencer for Bulgaria:

 

Adios!

 

Getting Started with SharePoint 2013 and Office 2013 Application Development

So chances are you’ve heard a  lot of noise around the official launch of SharePoint and Office 2013… Well there is a LOT to it. New App development models, new features and API’s, enhanced capabilities and a ton of improvements. The Apps for Office paradigm is also very slick.

So where do you start?

SharePoint 2013 Developer Training: http://msdn.microsoft.com/en-US/office/apps/fp123626- here you will find a ton of cool videos showing off some new stuff. They even have stuff on Project 2013 development 

 

 Maybe PSI will work this time?

The Office and SharePoint App Development site: http://msdn.microsoft.com/en-US/office/apps- a TON of resources. Some are still being added so you might get some 404’s

The Apps for SharePoint (2013) Overview - http://msdn.microsoft.com/en-us/library/office/apps/fp179930(v=office.15) – definitely one of the best places to start reading up on how SharePoint 2013 introduces a new development paradigm.

Developer downloads: http://msdn.microsoft.com/en-US/office/apps/fp123627 – Expect the official SDK to be released here.

 

Currently rated 5.0 by 1 people

 

Download the SharePoint 2013 (15) Preview

Ive been waiting for this day for a LONG time... The internet is going crazy over the new Office 15 and us SharePoint fans can’t sleep from all the excitement either.

Watching all the online commotion, chatter and reviews is fun, but the best part is trying it out yourself.

Get your hands dirty:

http://www.microsoft.com/en-us/download/search.aspx?q=SharePoint+2013

 

The bits are getting added one-by-one as I am typing this, so there you go.

Also check out the Office 365 CP:

http://www.microsoft.com/office/preview/

 UPDATE: here is the link to SharePoint Server 2013: http://technet.microsoft.com/en-us/evalcenter/hh973397