Archive for category: SharePoint Addins

SharePoint App, Custom Domain and free SSL certificate

25 Mar 2017
March 25, 2017

Recently I created lots of SharePoint provider hosted apps for several customers – most of them very simple apps to register a remote event receiver or send emails. But a few of them were complex business apps that used the integration options for SharePoint but stood almost separately as websites running on Azure. The first apps we created had the name <app>.azurewebsites.net – and for some customers that looked so odd that they opened tickets and asked for confirmation if the apps are legit. And that makes perfect sense because everybody could create a website and call it superlegitcustomerapp.azurewebsite.net, right? So in this blog post I will show you how to run an app on a custom domain with a free SSL certificate.

For this article I assume that you have your SharePoint App up and running on Azure – and I assume that you have a domain to use.

Register the custom domain on Azure

3 easy steps to register a new hostname

First things first – tell the azure website that it will have a new hostname to respond to. Therefore go to the azure portal, open your website and click on “custom domain”. Then add your domain or subdomain that should be the new entry point of your app. Once you have done that, you need to validate the websites by adding a txt record to your nameserver with the value * mapped to .azurewebsites.net – full guide is here.

domain validation via nameserver entry. The @ symbol was not allowed, but with * it worked.

After validation was successfully it should look like that:

new entry was added successfully

For the custom domain you need at least a shared instance tier for your azure website.

New name – new problems

Ok, now we have setup the new hostname and we can open up the site with that – but that creates some problems:

  1. The app registration (/_layouts/15/appregnew.aspx) needs to be updated
  2. The app manifest and the app points to the old site
  3. There is no SSL certificate for the new name

1 & 2 are easy solvable: Open the app in Visual Studio, change the app domain, upload it to the app store, trust it and re-add it to your sites. But if you open the new app – you will either redirect to http:// and have all you traffic sent over an encrypted connection – or you send it to https:// and will be greated by a security warning in your browser because there is no SSL certificate present for your new domain.

Free SSL certificate

In the past I heavily used free SSL certificates from StartCom because they were trusted in all browsers and were free for 1 year – but they lost trust in google chrome and firefox recently so that is no longer an option. Not using a ssl certificate is no option at all – business apps need security and trust – therefore I needed another option, preferably free so no long discussion with customers, CSRs and all that to request a certificate for your needs. I want easy.

Let’s encrypt for the rescue

There is a really great organization that provides free SSL certificates – Let’s Encrypt – and I use them for this blog with ease, too. So why not use them for my Azure websites? The let’s encrypt certificates only lasts 3 months and should be renewed automatically (way better than certificates that lasts 1 year and have to be renewed manually…) – so there should be some sort of integration right into the azure websites for that – and there is! Thanks to the awesome work of Simon J.K. Pedersen there is a Azure Website Extension for Let’s Encrypt.

The installation was really straightforward for me and is well documented here – I added the extension (choose the correct version for 32 or 64bit!), register a new service principal and give it contribute permissions – open the extension site https://.scm.azurewebsites.net/letsencrypt/ and enter all the required values:

Once you save it the magic happens – two webjobs will be registered that request a new certificate, register them and two weeks before expiry renew them automatically for you. Awesomesauce!

For the custom ssl certificate you need at least a basic app service plan.

Summary

So once you have done all that you will have a nice domain for your app – giving your users trust and easy to recall entry to your business application – and all that is free with zero maintenance. And all your browsers love it, too:

trusted in Google Chrome

trusted in IE11

 

So if you create a new app – register the domain first, follow the guide above and you are good to go – the secure way: customer happy, developer happy, security guy happy! 🙂

 

 

 

Ignite 2016 – My SharePoint takeaways!

04 Oct 2016
October 4, 2016

Ignite 2016 is over and we all were updated with tons of new features, announcements and insights in Atlanta – in this post I will try to give you a summary what I learned at Ignite 2016 SharePoint Conference it Atlanta.

Office 365 and SharePoint Online

I took that one from the official source because it pretty sums up whats coming:

The next wave of innovations to achieve the SharePoint vision (simple and powerful file sharing, mobile and intelligent intranet, open and connected platform, commitment to security, privacy and compliance) contains the following highlights:

  1. A significant update to the OneDrive browser experience, so that you can find, access, share and collaborate on all your files in Office 365
  2. OneDrive sync preview for SharePoint Online document libraries and folders shared with you
  3. Team news to keep your team up to date and informed of what matters
  4. People cards in SharePoint and OneDrive for Business that intelligently surface content and details from your colleagues’ profiles
  5. New integration with Microsoft Flow, PowerApps and Yammer
  6. Preview of the SharePoint mobile apps for Windows 10 Mobile and Android
  7. Enhancements for developers including new sites and lists APIs in Microsoft Graph
  8. New security controls including site classification and conditional access based on location and device
  9. Feature Pack 1 for SharePoint Server 2016
  10. Expanded FastTrack services and tools to support hybrid configurations and migration

And the Roadmap for Q4 2016 and H1 2017 – I really like the transparency:

SharePoint Roadmap 2016 2017

Modern Pages / Modern Document Library / Refresh to Teamsites

I really recommend you to watch the entire session – some pretty good stuff in it:

In the next month we will see lots of updates to the modern document library experience, modern pages and updates to our beloved teamsites (about time!).

Every teamsite get a "News", "Activity" and "Links" section.

Every teamsite get a “News”, “Activity” and “Links” section. Tighter integration into mobile apps (right side)

And “modern pages” looks awesome, too. The promise here is that they will render on desktop, mobile browser and in the mobile apps – more on the apps late in this post.

People card

What I really liked is the new people card – more user-centric experience are always great. “Who is that person? What is he doing in the organization and what is he working on?” – cool!

SharePoint People Cards - a more user centric experience

SharePoint People Cards – a more user centric experience

 

Security & Compliance

As part of the Office news the following new security and compliance capabilities in Office 365:

  • Improvements to Office 365 Advanced Threat Protection
  • Threat Intelligence
  • Advanced Data Governance
  • Updates to Advanced Security Management

And more insights with lots of graphs:

More insights what our users are actually doing!

More insights what our users are actually doing!

App Launcher

The new version of the Office 365 App Launcher gives you access to these new features:

  • Additional customization options
  • search across all the services and applications
  • A tabbed layout
  • You can resize, pin and organize tiles
  • Support for Office 365 themes

And in a not so distant future it will list your recent Office documents:

app-launcher

OneDrive for Business

Major updates to OneDrive for Business – as mentioned in this post, OneDrive caused a lot of service requests in the past – but it will massively improve with the coming updates!

  • Ability to sync SharePoint Online document libraries and OneDrive folders shared with you (preview available here).
  • An activity center has been added to the OneDrive sync client to allow you to view synchronization and file activity at a glance (preview).
  • Notifications to your iOS or Android device when someone shares a OneDrive file with you.
  • Access to SharePoint Online files in the OneDrive app on Android.
  • Multi-page scan enhancements in the OneDrive app on Android.
  • Ability to see over time how many people have discovered and viewed your files in OneDrive for iOS.
  • Enhancements to integration with Office 2016 (First Release).
  • Simple, flexible OneDrive user management in Office 365 (First Release).
SharePoint Online Sync Preview - finally you can sync the files from a teamsite

SharePoint Online Sync Preview – finally you can sync the files from a teamsite

These new features are in the pipeline:

  • Rich thumbnails and previews for over 20 new file types (rolling out before the end of 2016).
  • Ability to access and edit all your files in OneDrive and SharePoint Online from the OneDrive browser client (rolling out before the end of 2016).
  • Capability to download multiple files as a .zip file (rolling out before the end of 2016).
  • Dedicated OneDrive administration console in Office 365 (rolling out before the end of 2016).

More of that in my “OneDrive for Business – key feature and roadmap” summary.

PowerApps & Flow

That’s what excited me the most – whats coming after InfoPath, lots of clients asked me about guidance here. And well, the answer could be PowerApps.

I attended 2 sessions to see whats coming for PowerApps and Flow – and I will soon play with it because there is so much demand in forms and simple workflows. Having the same functionality even in a mobile app will be awesome (try that with InfoPath…).

  1. PowerApps works only if an internet connection is available
  2. Its currently in preview
  3. You can connect to data sources onPrem if you install a gateway service

Flow on the other side looks like the implementation of if this then that / IFTTT – simple workflows are possible here e.g. approval and all that stuff. The power of that come into play when you connect different tools with that (Salesforce, Twitter, Slack, SQL, etc).

Groups & Yammer

  • Better integration of Yammer in Office 365 groups
  • Uploading of files directly from SharePoint/OneDrive for Business sites, and edit them directly in the browser.
  • Share content by mail with Yammer groups
  • Manager Yammer within O365 admin center
Share files from SharePoint or OneDrive

Share files from SharePoint or OneDrive

More on that in the announcement blog post.

SharePoint Framework

Apparently I could not make it to any SharePoint Framework (SPFx) session at all – the conference was packed with so many good sessions that I had to make compromises. But lots of the Framework was already announced at May, 4th event.

My Analytics

Delve Analytics was renamed to MyAnalytics – the change of the name is already live in my tenant.

  1. Pinning of important contacts so you can easily see if you are loosing touch with important peers
  2. Share metrics with peers to get a review or opinion about your work habits
  3. Adjust your priorities to get better results

More on that here: Create better work habits with MyAnalytics (formerly Delve Analytics)

SharePoint onPrem

Feature Pack 1 was announced and will available in November – and not in Q1 2017

  • Logging of administrative actions performed in Central Administration and with Windows PowerShell
  • Enhancements to MinRole to support small environments (see my post here for more details)
  • A new OneDrive for Business user experience
  • Custom tiles in the SharePoint app launcher
  • Unified auditing across site collections on-premises and in Office 365
  • Unified taxonomy across on-premises and Office 365
  • OneDrive API 2.0

Q4 2016:

  • Feedback driven updates to doclibs, lists, pages, sites and apps
  • Team news
  • Intelligent People Cards
  • SharePoint mobile app WW Release (Android, Windows)
  • Next generation sync of team sites
  • Simple, fast site creation
  • SharePoint Framework WW Release

First half of 2017:

  • Feedback driven updates to doclibs, lists, pages, sites and apps
  • More web parts
  • Publishing Sites
  • More Flow and PowerApps integration
  • SharePoint Add-in improvements
  • Modern team site extensibility
  • Performance-focused CDN integration with publishing sites

SharePoint Mobile Apps

The mobile apps got a lot of love recently – and lots is on the roadmap for them. The “intranet in your pocket” with native apps on every platform is a great driver for user adoption.

SharePoint Roadmap

SharePoint Mobile Apps Roadmap

More details in my summary post Explore whats new and whats coming with the SharePoint Apps

Spirit

SharePoint is alive! It was a blast to see how much attention (and love) SharePoint got at the Ignite 2016 – that hasn’t been always the case. The following PowerBI analyzed the hashtags on twitter during the Ignite – #SharePoint clearly ruled. I doubt that it’s because SharePoint people tweet more – the many announcements and huge amount of sessions must be the cause for that:

Microsoft Ignite 2016 delivered so many promising updates to current and planned developments nobody could doubt that SharePoint has a bright future! SharePoint ain’t dead!
If you want to see more about the general roadmap, visit https://fasttrack.microsoft.com/roadmap for more insights.

If you have questions about Ignite 2016, please let me know in the comments. If wrote about every session I attended at Ignite 2016, please see the archives if you want more details.

Azure Website Debugging: The network connection to *.azurewebsites.net:4020 has been lost. Debugging will be aborted.

08 Sep 2016
September 8, 2016

Recently my colleagues and I created a lot of SharePoint provider-hosted addins – in our case that is just a MVC Website hosted on Azure that talks balk to SharePoint. And I have to say it is good fun because we could actually debug a production site/business application in case something unforeseeable happens (aka. bugs). And the integration in Visual Studio via the Cloud Explorer could not be simpler. Right click on the website, attach debugger and see the problem.

Attach debugger on your remote azure website - cant be easier!

Attach debugger on your remote azure website – cant be easier!

 

That worked a long time perfectly for us – but something changed and Visual Studio 2015 dropped the connection once a breakpoint is hit (sometimes even earlier). Strangely debugging still worked with Visual Studio 2013.

Symptoms

Attaching with a Visual Studio 2015 Debugger either from Cloud Explorer, Server Explorer or directly via “attach to process” attaches the debugger briefly (if at all) and then results in two errors:

  1. The web browser shows: 502 – Web server received an invalid response while acting as a gateway or proxy

    502 – Web server received an invalid response while acting as a gateway or proxy

     

  2. In Visual Studio 2015 an error box shows: The network connection to <>.azurewebsite.net:4020 has been lost. Debugging will be aborted.

    Debugging will be aborted

    Debugging will be aborted.

Fix

The fix is rather simple. In Visual Studio open Debug menu from the top and click on Options:

2016-09-07 14_33_50-Debug Options

Then click on Debugging > General and find the option “Enable UI Debugging Tools for XAML” and uncheck it. 2016-09-07 14_37_36-Options

After that, Debugging worked like a charm again.

Thank you!

I did not find that one out myself – the awesome Microsoft Support (I am looking at you Akash Khandelwal!) spent hours troubleshooting my problem. He early noticed that there is a something with WPF in the logs but we initially ruled that one out. After a while his team suggested to disable this option – and it worked!

During the debugging session I learned a lot about Azure Website troubleshooting – great stuff!

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close