Category Archives: SharePoint

Speaking at SharePoint Intersection: Where Business, Technology, and Solutions Intersect, Oct 27th – 31st, Vegas!

I’m heading to Vegas at the end of this month to speak at the SharePoint Intersection event.  You should come!!

I’m speaking about:

  • Pre Day workshop: Getting Your Arms Around the SharePoint 2013 App Model (with Andrew Connell)
  • SESSION: Apps for SharePoint Primer
  • SESSION: Working with SharePoint’s REST, CSOM and APIs Remotely
  • SESSION: Soup to Nuts: How to Build a Metadata and Search Driven Intranet
  • INTERSECTION: Extending SharePoint with Apps and Enterprise Solutions (with Andrew Connell and Jeremy Thake)

Register with the code JOHNSON and get $50 off. And get a free Surface or XBox One!*

WHERE: October 27-31, 2013, MGM Grand, Las Vegas, Nevada

SHAREPOINT INTERSECTION 2013 is an entirely new type of event, and it’s the one event you won’t want to miss. Join the world’s top SharePoint experts, Microsoft’s own product team, and hundreds of peers representing IT, business, developer, and design communities as we intersect to solve business problems and to maximize the value of SharePoint for our organizations.  

TRAINING: SharePoint Intersection features more than 50 sessions presented by the best-known names in the industry.  As if that’s not enough, five full-day workshops dive deep into key challenges and workloads.

FOR ALL YOU’RE DOING: Training at SharePoint Intersection is not just “50 random sessions”. Instead, the event’s sessions have been carefully laid out to deliver end-to-end guidance and solutions across 11 scenarios or “workloads”

  • Developing Apps and Enterprise Solutions
  • Administering and Managing SharePoint
  • Upgrading and Migrating to SharePoint 2013
  • Strategy, Governance, Adoption, and the Business of SharePoint
  • SharePoint in Office 365, the Cloud and Hybrid Environments
  • Collaboration and Content Management: ECM, IM, RM and DM
  • Search with SharePoint
  • Workflow, Business Process Management and Automation
  • Insight, Business Intelligence and Data Visualization with SharePoint and SQL Server
  • Branding, Design, and User Experience
  • SharePoint Social and Yammer

FOR YOUR ENTIRE TEAM: Unlike other events, SharePoint Intersection’s content chairs—SharePoint MVPs Andrew Connell and Dan Holme—have assembled an event that addresses the needs of everyone who is involved with, touched by, and impacted by SharePoint. You’ll find best-of-class content, whether you are a

  • Developer
  • IT Pro
  • Business manager or platform owner
  • Business user
  • Designer

SUCCEED TOGETHER: When it comes to maximizing the business value of SharePoint, and delivering real business needs, it takes the entire team.  We must come together, as business, IT and developers, to solve our problems.  At SharePoint Intersection, each scenario or workload features a unique Intersection Session, in we bring together IT, business, developers and our SharePoint Experts to answer questions, tackle the most pressing issues, get on the same page, and to build a path to success. We’re confident that the open forum Q&A style of these Intersection sessions will be among the most valuable experiences you take away from SharePoint Intersection.

BEYOND SHAREPOINT: SharePoint Intersection is just one of the events that is part of DEV INTERSECTION.  And as a SharePoint Intersection attendee, you have full access to dozens of sessions across other Intersection events, covering SQL, ASP.NET, Visual Studio, Azure, and Open Source.

FREE SURFACE OR XBOX ONE*

*When you make the most of SharePoint Intersection by registering with a Show Package that includes one or more full-day workshops, you’ll receive your choice of an XBOX ONE or SURFACE RT! See the website for details.

Keeping up with cloud releases, Yammer vs. 365

A colleague Brendon Ford , and Office 365 MVP I would add, pointed me at a great resource today for keeping up with what Yammer are up to in terms of new stuff coming down the line.

http://success.yammer.com/product/releases/

This gives a reasonable amount of detail on the things they are working on and at what stage they are at.  I say reasonable because they don’t give hard dates on when things will release, but they do give some detail on what is coming.

Here are some examples that specifically relate to Office 365.

Better search integration…

image

Could this be the single sign on we are all waiting for?  Maybe not, but it seems to be getting better…

image

Office web app integration in Yammer for viewing documents etc…

image

This is pretty cool insight into what’s coming.

The question I have is:

When are we going to get this level of visibility into the core Office 365 products? Exchange, Lync and SharePoint?

One of the big issues we face with customers in Office 365 is having zero visibility into when things change.  We are not alone, Jeremy has a good write up about some issues they have faced with APIs changed unexpectedly.

If I were at Microsoft still here is a sampling of things I would be pushing hard for:

  • Release and Update schedule.  Notes on exactly what is coming and when (per tenant).
  • Dev sandbox.  Ability to ask for a temporary test tenancy on a particular “version” of the service/product so that customers and partners can test their other systems that integrate with Office 365.
  • Postponement.  The ability to ask for a postponement of an update for up to 30 days. This would give customers/partners time to test and fix up any issues.
  • Open dialog with trusted advisors.  Microsoft was built on the back of strong partnerships.  Having a group of trusted advisors with a Bat Phone to someone who cares in engineering would go a long way. This group wouldn’t need to be big, but would be of good people who get it. People who want to help MS get better, not moan about it publically.

Some might say:

“Chris that is all great, but surely they should just get their cloud model to work and not break stuff randomly!”

Yeah that is great if you think you can reach Nirvana.  However, that is an impossible goal. Especially with something as complicated as Office 365 and all of its constituent parts.  Don’t let some chump from the valley with bubble gum SaaS product tell you otherwise 🙂

I think with some of the above changes proposed that things would get A LOT better really quickly.

-CJ

SharePoint Saturday Redmond – Building solutions with the future in mind

I had a great time presenting at the SharePoint Saturday Redmond event today at the Microsoft Conference Center in Redmond.

My session was aimed at asking people to think about building and architecting solutions today while keeping the future in mind … even if you don’t have any plans to move to the cloud in the near future.

Even if you are not building cloud apps or solutions today this is still relevant. Get code out of your SharePoint processes and into a loosely coupled architecture. Your servers will be safer, faster and will remain up more often.

Here are the slides.

Erica Toelle was kind enough to take some notes during the session: http://ericatoelle.com/2013/spsred-johnson/

Launching SharePoint Apps, launch sequence, debugging and AppRedirect.aspx

Writing SharePoint Apps can be tricky at times. Especially until you learn to know where to look when things are not working for you. Usually the first issue people strike is trying to launch their app and it not working.

Usually one of the first errors people strike is a common one that has an error that says “The parameter ‘token’ cannot be null or empty string”.

image

This is a signal that something went wrong launching the application and that some of the information that is passed to SharePoint during the app launch wasn’t passed correctly.  Usually due to an app setup issue.

The particular error above could be caused by a variety of issues, however the point of this post is to show you the first place I look when trying to debug it.  Hopefully this will help others find and fix their problem too.

First, to understand where to look when debugging its important to understand the process of what happens when you are launching a SharePoint App. The basic steps of the launch process are:

  1. User clicks the app to launch it
  2. SharePoint sends the user to the AppRedirect.aspx telling it what app to launch
  3. AppRedirect.aspx builds a set of launch parameters including a context token and other parameters about the SharePoint site launching the app e.g. SPSiteUrl
  4. AppRedirect.aspx renders a page with these parameters as a hidden HTML form on the page
  5. Javascript runs that submits the form to the applications launch page, POSTing these form parameters along with some query string parameters
  6. The App page is called and can get these parameters from the Request and use them as it needs. e.g. for using the CSOM to call back to SharePoint.

The error shown above is a snippet of boilerplate code from a provider hosted app code template in Visual Studio.  In order to construct the CSOM context the classes in TokenHelper.cs that are used need some of the information passed in the POST parameters from AppRedirect.aspx.  These are not on the query string as they are POST parameters, so this is usually where people get stuck debugging.  You need to use a tool like Fiddler to see the POST being made and take a look at it.

Below is what the launch sequence looks like in Fiddler (click on the image to get a bigger version):

image

  1. AppRedirect.aspx is called and the launch parameters are constructed and the Form is submitted by the browser.
  2. The app page is called, in this case Default.aspx
  3. My app wants to make a call using the CSOM to SharePiont and as part of that needs an OAuth Access Token, so is reuqesting one from Azure Access Control Services (ACS) (topic for another post).
  4. Finally the CSOM query is processed and the call to ProcessQuery is made.

In the browser you will recognize the AppRedirect.aspx page by the infamous “Working on it…” text 🙂

If you open #1 above in Fiddler in the raw response to the browser you will see the following:

image

This is the HTML Form with the launch parameters included. 

If the SPAppToken is empty … you have a launch problem 🙂

If your form is missing the SPAppToken then you will get the error message at the beginning of those post. It’s got the context token that you need in order to use the CSOM.

If it’s empty in the Form you likely have an error message in the SPErrorInfo giving your some more information about why is null/empty.

SPErrorInfo is your first place to start looking for why things are not working.

This should provide some insight and more pointers on where to look next.

E.g. “The Azure Access Control service is unavailable”.   This message says that SharePoint can’t construct the SPAppToken because it cant talk to ACS in order to do that.  This could be for a variety of reasons, such as network connectivity.

This post wasn’t written to solve every problem you have with launching an app.  It was posted to help those trying to debug their apps.  I thought it would be useful for those wanting tips on where to look to find some information when they are having issues launching their app.

I hope to helps!

-CJ

SharePoint Saturday Redmond coming on Sept 21st

One of great joys of the SharePoint community is the momentum of the SharePoint Saturday community led events. These are run by the community for the community and are one day events … on a (you guessed it) Saturday.  People take time our of their personal schedules to attend and hear from speakers on all sorts of topics.

SharePoint Saturday Redmond is coming up again this year on the 21st of September.

This year Provoke Solutions are proud to be a Gold sponsor of the event and will have a booth on site Come and talk with us about your SharePoint needs!

This year I have the pleasure of speaking at the event also:

Designing and Building solutions with the future in mind
Want to know how to ensure you don’t develop your way into a dead end? The cat is out of the bag on the new Apps development model in SharePoint 2013. Come and learn about architecting and designing your SharePoint development projects today in order to be set up for taking advantage of this new model in the future. We will cover all the basics on the new model to bring you up to speed, plus how they translate to decisions you need to make today in your projects to ensure you don’t dig a hole that’s hard to get out of in the future.

To learn more about the event and to registers (its FREE!) head over to:  http://spsevents.org/city/Redmond/SPSRed2013

-CJ

Sharepoint Provider Hosted Apps in Azure monitoring tip

One of the tips I gave to during my session at TechEd North America this year was about using SignalR in your SharePoint provided hosted applications in Azure.

One of the pain points for developers and people creating provider hosted apps is monitoring them when they are running in the cloud. This might be just to see what is happening in them, or it might be to assist with debugging an issue or bug.

SignalR has helped me A LOT with this.  It’s a super simple to use real time messaging framework. In a nutshell it’s a set of libraries that let you send and receive messages in code, be that in JavaScript or .Net code.

So how do I use it in SharePoint provider hosted apps in Azure to help me monitor and debug?

A SharePoint Provider Hosted App is essentially a web site that provides parts of your app that surface in SharePoint through App Parts or App Pages etc… It’s a set of pages that can contain code behind them as any regular site does.  It’s THAT code that runs that I typically want to monitor while its running in the Azure (or anywhere for that matter).

So how does this work with SignalR?

SignalR has the concept of Hubs that clients “subscribe” to and producers of messages “Publish” to.  In the diagram below App Pages code publish or produce messages (such as “there was a problem doing XYZ”) and consumers listen to a Hub and receive messages when they are published.

image

In the example I gave at TechEd I showed a SharePoint Provider Hosted App deployed in Azure that Published messages whenever anyone hit a page in my app.  I also created a “Monitor.aspx” page that listened to the Hub for those messages from JavaScript and simply wrote them to the page in real-time.

How do you get this working? It’s pretty easy.

Part 1: Setting up a Hub and publishing messages

First add SignalR to your SharePoint Provider Hosted app project from Nuget. Click the image below for a bigger version showing the libraries to add.

image

Then in your Global.asax.cs you need to add a Application_OnStart like this.  It registers SignalR and maps the hub urls correctly.

protected void Application_Start(object sender, EventArgs e)
{
    // Register the default hubs route: ~/signalr
    RouteTable.Routes.MapHubs();
}

Note: You might not have a Global.asax file in which case you will need to add one to your project.

Then you need to create a Hub to publish messages to and receive them from.  You do this with a new class that inherts from Hub like this:

public class DebugMonitor : Hub
{
    public void Send(string message)
    {
        Clients.All.addMessage(message);
    }
}

This provides a single method called Send that any code in your SharePoint Provider Hosted app can call when it wants to send a message. I wrapped this code up in a short helper class called TraceCaster like this:

public class TraceCaster
    {
        private static IHubContext context = GlobalHost.ConnectionManager.GetHubContext<DebugMonitor>();
        public static void Cast(string message)
        {
            context.Clients.All.addMessage(message);
        }
    }

This gets a reference to the Hub called “context” and then uses that in the Cast method to publish the message.  In code i can then send a message by calling:

TraceCaster.Cast(“Hello World!”);

That is all there is to publishing/sending a simple message to your Hub. 

Now the fun part … receiving them 🙂

Part 2: Listening for messages

In my app I created a new page called Monitor.aspx. It has no code behind, just client side JavaScript. In that code it first references some JS script files: JQuery, SignalR and then the generic Hubs endpoint that SignalR listens on.

<script src=”/Scripts/jquery-1.7.1.min.js” type=”text/javascript”></script>
<script src=”/Scripts/jquery.signalR-1.1.1.min.js” type=”text/javascript”></script>
<script src=”/signalr/hubs” type=”text/javascript”></script>

When the page loads you want some JavaScript that starts listening to the Hub registers a function “addMessage” that is called when the message is sent from the server.

$(function () {
    // Proxy created on the fly         
    var chat = $.connection.debugMonitor;

    // Declare a function on the chat hub so the server can invoke it         
    chat.client.addMessage = function (message) {

        var now = new Date();
        var dtstr = now.format(“isoDateTime”);

        $(‘#messages’).append(‘[‘ + dtstr + ‘] – ‘ + message + ‘<br/>’);
    };

    // Start the connection
    $.connection.hub.start().done(function () {
        $(“#broadcast”).click(function () {
            // Call the chat method on the server
            chat.server.send($(‘#msg’).val());
        });
    });
});

This code uses the connection.hub.start() function to start listening to messages from Hub.  When a message is sent the addMessage function is fired and we can do whatever we like with it. In this case it simply adds it to an element on the page.

All going well when you are running your app you will be able to open up Monitor.aspx and see messages like this flowing:

image

If you don’t see messages flowing you probably have a setup problem with SignalR.  The most common thing I found when setting this up was the client not being able to correctly reference the SignalR JS or Hub on the server.  Use the developer tools in IE or Chrome (or Fiddler) to check that the calls being made to the server are working correctly (see below for what working should look like):

image

If you are sitting there thinking “What if I am not listening for messages? What happens to them?” I hear you say!  Well, unless someone is listening for the messages they go away. They are not stored. This is a real-time monitoring solution. Think of it as a window into listening what’s going on in your SharePoint Provider Hosted app.

There are client libraries for .Net, JS, iOS, Android too. So you can publish and listen for messages on all sorts of platforms.  Another application i have used this on is for simple real time communication between Web Roles in Azure and Web Sites in Azure.  SignalR can use the Azure Service Bus to assist with this and its pretty simple to set up.

Summary

I’m an developer from way back when debugging meant printf.  Call me ancient but I like being able to see what is going on in my code in real time. It just gives me a level of confidence that things are working the way they should.

SignalR coupled with SharePoint Provided Hosted Apps in Azure are a great combination.  It doesn’t provide a solution for long term application logging, but it does provide a great little realtime windows into your app that I personally love.

If you want to learn more about SignalR then I suggest you take a look at http://www.asp.net/signalr where you will find documentation and videos on other uses for SignalR.  It’s very cool.

Do I use it in production? You bet!  I use it in the backend of my Windows Phone and Winodows 8 application called My Trips as well as in SharePoint Provider Hosted Apps in Azure. Here is a screen shot from the My Trips monitoring page, I can watch activity for various devices registering with my service etc…

image

Happy Apping…

-CJ

SkyDrive Pro naming quandary and the mess of MS file sync products

Today Mary Jo Foley wrote a piece about Microsoft losing the fight with British Sky Broadcasting Group over the name SkyDrive and in particular (as I understand it) in the “Sky” part of that.

Microsoft to rebrand SkyDrive after losing trademark skirmish – Mary Jo Foley – ZD Net

In that article she also mentions that this will likely effect the SkyDrive Pro product naming also.  Which perked my ears up given its SharePoint linkage.

I never liked the SkyDrive Pro name.  Why?  Primarily because it makes it sound like it has something to do with SkyDrive and cloud storage.  When in reality you can use SkyDrive Pro to sync files from your on-prem SharePoint system … which doesn’t feel particularly “Sky” or “Cloudy” to me!  It just confuses everyone I speak with.

I can see what Microsoft were trying to achieve with regards to Office 365 and syncing files … it makes a little more sense in that regard.  However, I always had a problem with it “hooking” on to the consumer brand of SkyDrive. They are 100% totally separate products, no technical similarities etc… The only similarity is that they sync files to your PC from somewhere.

I actually think having to rename SkyDrive is a blessing in disguise for Microsoft.

Now is the perfect time to get it right and clear up all the confusion!

To make naming and technology matters worse Windows Server 2012 R2 is introducing a feature called “Work Folders” which enables access to on-prem file shares remotely. The reason being that 1000s of customers have files in shares and will continue to do so & therefore it would be good to have access to those remotely.  You can read about Work Folders here: Introducing Work Folders on Windows Server 2012 R2  It’s actually a pretty nifty solution.

SO!  Now we currently have:

  • SkyDrive Pro – which allows you to sync files from Office 365 and from SharePoint on-prem.
  • Work Folders – which allows you to access files from file shares on-prem.

Do you see where I am going with this?

Wouldn’t it be sensible for Microsoft to release ONE Enterprise grade file sync/access tool that let you access files from Office 365, SharePoint on-prem and file shares on-prem?

I call it “Files”.  Users would never see that name however as it would show up branded/renamed in Explorer, iOS, Windows 8 and Windows Phone using the organizations logo and name e.g. “Contoso Files”.

Currently here is what i see in Explorer:

image

Here is what I want to see in Explorer:

image

In that one location you would see a list of “folders” that either belong in SharePoint on-prem, Office 365 or Work Folders (file shares on prem).

image

Is this really too much to ask for?

I don’t think so 🙂

With branding up in the air it would be a good time to strike and fix the mess up. However, I suspect it will take a while for this to happen and we are likely to see a name change first in the coming weeks/month (after all its a Select All replace right?! :)) and a consolidated product down the line (all fingers crossed).

What do you think should happen? or what would you like to see from Microsoft to make your file sync and management simpler?

-CJ.

SPChat transcript: App Model with Chris Johnson

On Wednesday last week I had the pleasure of participating in my first SPChat over on the SharePoint-Community.net site.  These are online Q&A based chats where an “expert” is invited and questions are fielded in real time from the live audience.  Each chat has a topic, but anything goes within that topic.

My topic was about the new SharePoint application model for developers is SharePoint 2013 and Office 365. It was really fun fielding questions, but i also felt like my typing was slow and it was hard for me to temper my answers with knowing that i wanted to get as many questions answered as possible.

Questions ranged from the app store submission process to app domain isolation, to tools i use in app development and the financial side of apps.  All interesting topics.

You can read a full transcript online here:

http://sharepoint-community.net/profiles/blogs/spchat-transcript-app-model-with-chris-johnson

I hope to do another one some day!

-CJ

DIWUG article on SharePoint and Yammer

This month I was honored to be able to contribute to the Dutch Information Worker User Group (DIWUG) e-magazine.

The article is titled “SharePoint, Yammer and the social landscape” and basically covers the lay of the social landscape as it currently stands & what organizations can do now to help with the rift we currently see in SharePoint and Yammer social features.

The magazine is free and available to download here:
http://www.diwug.nl/e-magazines/Pages/default.aspx

6-28-2013 12-31-29

Thanks,

-CJ