The Help Desk demo, Part 8–Deploying to Azure

What good is an application if folks can’t actually use it?  So far, we’ve just been running and testing the application in Visual Studio.  That’s all fine and well, but asking our Help Desk operators to fire up Visual Studio each time they need to go to work just doesn’t really seem feasible.

We could start by creating a new Web App directly in Azure.  That would work fine, but since we’re developers, let’s just use the Visual Studio tooling that’s already available.  There are a LOT of tutorials on creating and deploying an Azure Web App on the Internet, so we won’t reinvent that wheel here.  However, we do need to make a couple of modifications from a stock Azure Web App deployment for all of this to work.

First, we need to export our .CER certificate that we created earlier to a .PFX certificate.  Remember that we installed the certificate into our Personal store.  To export the certificate, we first need to launch CertMgr by running certmgr.msc.

image

In the window that opens, expand Certificates and then Personal:

image

Then, find the BusinessApps.HelpDesk certificate that we created earlier, right click on it and choose All Tasks –> Export…

image

In the window that opens, click Next:

image

Select Yes, export the private key and click Next:

image

Leave ‘Personal Information Exchange – PKCS #12 (.PFX) selected and click Next:

image

Check the Password box and enter a suitable password:

image

Finally. choose an output location and click Next:

image

Confirm the information in the final screen and click Finish:

image

If all goes well, a success screen will be displayed:

image

Next, we’ll go to the Azure portal and find the new BusinessApps-HelpDesk web application and into the Configure screen.

image

Scroll down a bit in the screen, find the certificate section, and click ‘upload a certificate’:

image

In the window that opens, browse to find the certificate that we just saved, enter the password, and click the check mark:

image

After the certificate has uploaded and been added, we’ll copy the Thumbprint value to our clipboard:

image

Then, we’ll scroll down to find the app settings section, enter WEBSITE_LOAD_CERTIFICATES for a new app settings and the thumbprint from above as the value, and click Save:

image

If all goes well, the portal will give us a message that the configuration was updated successfully:

image

And that’s it!  If we launch our sweet new app, it should load as expected:

image

How cool is that?  Now, go show all of your co-workers how awesome of an Office 365 and Azure developer you have become!

The Help Desk Demo

The entire source code for the Help Desk demo can be found here https://github.com/OfficeDev/PnP/tree/dev/Solutions/BusinessApps.HelpDesk/, in the Office 365 Dev PnP GitHub repository.

Leave a Reply

Your email address will not be published. Required fields are marked *