![Page 1: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/1.jpg)
HEADING TO THE CLOUDIntroduction to deploying a Provider-Hosted App in Azure
![Page 2: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/2.jpg)
HOUSEKEEPING…
• Download EventBoard Mobile and remember to fill out session evaluations…
• Phasers set to stun, mobile devices set to silent…
• You must be present to win at the wrap-up…
![Page 3: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/3.jpg)
XENOX GARAVITO
SharePoint Developer
Planet TechnologiesMCPD, MCITP, MCT
![Page 4: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/4.jpg)
AGENDA
• SharePoint Development Overview
•What are SharePoint Apps?
•What do I need to get started?
• Scenarios
![Page 5: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/5.jpg)
SHAREPOINT DEVELOPMENT
SharePoint 2003/2007
• Web Parts
• WSP (2007)
• Server Side Code (GAC or BIN)
• Client side code (Page customizations)
• Web Services (Lists.asmx)
SharePoint 2010• More of the same
• Farm Solutions
• Better integration with Visual Studio
• List data Rest service (listdata.svc)
• Sandbox Solutions
• Isolated Process
SharePoint 2013• Farm Solutions
• Sandbox Solutions with code are deprecated
• Apps!
![Page 6: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/6.jpg)
WHAT ARE APPS?
Apps for SharePoint are easy-to-use, lightweight web applications that integrate popular web standards and technologies to
extend the capabilities of a SharePoint website
![Page 7: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/7.jpg)
WHAT ARE APPS?
SharePoint Hosted
• Client side• JavaScript
• CSS
• HTML
• Isolated to App Web
Provider Hosted
• Hosted outside of SharePoint
• On - premises
• In Azure
• Any language
![Page 8: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/8.jpg)
WHAT DO I NEED TO GET STARTED
•Development Environment•On Premises• Multi-VM
• Takes a lot of RAM (24GB?)
•Office 365• Visual Studio
![Page 9: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/9.jpg)
WHAT DO I NEED TO GET STARTED
• Easy/Quick to setup (5 min)
• Single Server
• No Active Directory built-in
• Better if added piecemeal as part of a farm
Standalone SharePoint 2013
![Page 10: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/10.jpg)
AZURE PORTAL
• Announced at Worldwide Partner Conference
• 9 VM High Availability Farm (or 3 VMs)
• https://portal.azure.com
• Quickly provision a farm
![Page 11: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/11.jpg)
AZURE PORTAL
• Entire Farm is built
• High Availability is available
![Page 12: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/12.jpg)
SHAREPOINT FARM
• Provisions multiple servers
• AD, SQL, SharePoint Front Ends
• Network
• Usually takes over an hour
• Some configuration needed to support app development
http://msdn.microsoft.com/en-us/library/office/fp179923(v=office.15).aspx
![Page 13: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/13.jpg)
CONFIGURE SHAREPOINT FARM
• Login to Domain Controller
• Install AD DS Tools and DNS Server Tools
![Page 14: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/14.jpg)
CONFIGURE SHAREPOINT FARM
• Add a new Subnet to Azure Network• Used for a development Visual Studio server
![Page 15: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/15.jpg)
CONFIGURE SHAREPOINT FARM
• Create a new VM within the Farm Network
•Use Visual Studio 2013 Template
• Add to the SharePoint Farm Domain
• Install most recent Visual Studio Update
• http://www.visualstudio.com/news/vs2013-update4-rc-vs
![Page 16: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/16.jpg)
CONFIGURE SHAREPOINT FARM
• Add App Domain in DNS
![Page 17: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/17.jpg)
CONFIGURE SHAREPOINT FARM
• Point App Zone (appdomain.com) to the Visual Studio Server
• Point *.appdomain.com to the SharePoint Server WFE
![Page 18: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/18.jpg)
CONFIGURE SHAREPOINT FOR HIGH-TRUST (SERVER TO SERVER) APPS
• http://msdn.microsoft.com/en-us/library/office/fp179901(v=office.15).aspx
• Need an x.509 Certificate
• Can be self-signed for development (use IIS or MakeCert.exe)
$publicCertPath = "C:\Certs\HighTrustSampleCert.cer"$certificate = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($publicCertPath)
![Page 19: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/19.jpg)
CONFIGURE SHAREPOINT FOR HIGH-TRUST (SERVER TO SERVER) APPS
New-SPTrustedRootAuthority -Name "HighTrustSampleCert" -Certificate $certificate $realm = Get-SPAuthenticationRealm
$specificIssuerId = "11111111-1111-1111-1111-111111111111“$fullIssuerIdentifier = $specificIssuerId + '@' + $realm
New-SPTrustedSecurityTokenIssuer -Name "High Trust Sample Cert" -Certificate $certificate -RegisteredIssuerName $fullIssuerIdentifier –IsTrustBrokeriisreset
$serviceConfig = Get-SPSecurityTokenServiceConfig$serviceConfig.AllowOAuthOverHttp = $true$serviceConfig.Update()
![Page 20: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/20.jpg)
VISUAL STUDIO PROJECT
•New Project
• Choose APP-Authentication settings.• ACS (for SharePoint Online / O365)
• Client Certificate (for On Premises)
• Client ID auto set with F5 deployment
![Page 21: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/21.jpg)
VISUAL STUDIO
•Create SP Hosted App
•Create Provider Hosted App (On Prem)
•Create Provider Hosted App (On O365)
![Page 22: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/22.jpg)
REGISTERING YOUR APP IN THE CLOUD
• Note the App ID and Secret
• {SiteUrl}/_layouts/appregnew.aspx
• {SiteUrl}/_layouts/appinv.aspx
![Page 23: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/23.jpg)
AMS (APP MODEL SAMPLES)
• http://officeams.codeplex.com
• Examples, Guidance, reference code
• Reusable Components• People Picker
• Taxonomy Menu
• Taxonomy Picker
• Final July 2014 release -> Now in GitHUB
![Page 24: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/24.jpg)
OFFICE 365 -> PATTERNS & PRACTICES
• https://github.com/OfficeDev/PnP
• http://azure.microsoft.com/blog/2014/10/22/webjobs-goes-into-full-production/
• http://blogs.msdn.com/b/richard_dizeregas_blog/archive/2014/04/07/sharepoint-timer-jobs-running-as-windows-azure-web-jobs.aspx
![Page 25: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/25.jpg)
WEBJOBS IN AZURE
• Create Azure Website
• Add AZUREWEBJOBSTORAGE connection string to storage account for logging (Required!)
![Page 26: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/26.jpg)
WEBJOBS IN AZURE
• Get Client ID and Secret from a deployed SharePoint App and place in Web.Config
• Use as credentials for Console Application
string accessToken = TokenHelper.GetAppOnlyAccessToken( TokenHelper.SharePointPrincipal, siteUri.Authority, realm).AccessToken;
![Page 27: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/27.jpg)
WEBJOBS IN AZURE• Publish Console App as Azure WebJob using Visual
Studio
• OR ZIP it up (with DLL references) and deploy in Azure
![Page 28: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/28.jpg)
Thanks to our Sponsors!!!
![Page 29: Heading to the Cloud : Introduction to deploying a Provider-Hosted App in Azure](https://reader036.vdocuments.site/reader036/viewer/2022062405/55860401d8b42a3d6b8b4697/html5/thumbnails/29.jpg)
Join us at #SharePint sponsored by K2 at World of Beer of Reston in the Towncenter just across the bridge
Why? To network with fellow SharePoint professionalsWhat? SharePint!!!When? 6:00 PMWhere? World of Beer Reston1888 Explorer StreetReston, VA 20190
Thanks to?K2!