Pages Menu
TwitterRssFacebook

Posted by on Apr 29, 2015 in Learn Skype Web SDK

Learn Skype Web SDK Day -1 : Setting Up Your Development Environment

Learn Skype Web SDK Day -1 : Setting Up Your Development Environment

[contemplate-1]

Unlike many of the other Skype for Business APIs and SDKs, the Skype for Web API doesn’t require much setup at all. Because it’s designed to work anywhere all it really needs is a web connection. However, there are some tools you’ll want in place before you start, and some settings you’ll need to tweak.

Editors

You’ll need something to write and edit HTML in. You can use your favourite text editor, an IDE, or just notepad.exe. You’ll need a browser: any of the popular choices such as Internet Explorer, Chrome, Safari or Firefox should be fine, though you’ll want to make sure you’ve got an up to date version.

You’ll also benefit hugely from having Fiddler installed, for when things don’t work first time. Fiddler is covered in more detail in a separate section.

Hosting

You need to be able to host your code in a web-server, either locally on your machine or on a remote server. Whilst you can open local HTML files directly in your browser, Skype for Web API won’t work. The reason for this is security. If you think back to when you set up your server, you’ll remember that you had to specify which hostnames were allowed to connect to the server. When you’re hosting files locally you don’t have a hostname, so the server will refuse you. By hosting in a webserver, even though our hostname may only be “localhost” this will be enough (if we’ve added “localhost” to the server whitelist).

Adding “localhost” to the server whitelist is a security risk, and only recommended if you’re developing on a test system. If you chose not to do this when setting up the server, all of your Skype for Web API code needs to run from whichever domain you did whitelist.

The instructions below are for setting up Internet Information Services (IIS), the default web server on Windows machines. If you want to use a different web server you’ll need to make sure it’s turned on and set up.

Firstly, make sure IIS is installed. You can do this by choosing “Turn Windows Features On and OFF” and selecting “Internet Information Services”.

By default, IIS creates a single site (Default Web Site) which looks at files in the C:\inetpub\wwwroot folder. Your code is probably going to be kept somewhere else, so let’s add a new site.

In the Connections tree on the left-hand side, right-click Sites and choose Add Website. Choose a name for your new site, and navigate to the folder you want it to look in for website files. In this example, I’ve chosen to point it to a folder containing my sign-in code, but you could just create a new folder and put a single index.html file in it:

AddNewSite

You can either keep the default port number of 80, or choose a different one. If you keep port 80 then you’ll receive a warning that the port number is already in use, and that you’ll only be able to start one site at a time. This is because port 80 is already used by the Default Web Site. If you’re not using it, then you can right-click the Default Web Site and click Manage Website > Stop, and then do the same thing to Start your new site. Otherwise, choose another port number, as I have.

To view your new site, click the Browse button on the right hand side, in the Actions pane. This will open the site using the correct address and port number. If it doesn’t work: make sure that the user ApplicationPoolIdentity has permissions to access the folder you’ve chosen, or pick another user to run the Application Pool.

Important: You’ll remember from the previous post on Skype Web SDK Prerequisites that you need to tell Skype for Business about any domains which will be running code. Therefore, you should make sure that the full domain of the site you have just set up (including any port numbers) is correctly registered with Skype for Business as an allowed domain.

 

Written by Tom Morgan

Tom is a Microsoft Teams Platform developer and Microsoft MVP who has been blogging for over a decade. Find out more.
Buy the book: Building and Developing Apps & Bots for Microsoft Teams. Now available to purchase online with free updates.

2 Comments

  1. Great series of articles Tom, looking forward to the whole 30! Might want to fix the typo in the first sentence of your intro panel. 🙂

  2. Hi,
    I am trying to download Skype Web SDK from the following link but no luck
    getting an error stating that the “Requested Page not found”.
    https://msdn.microsoft.com/en-us/skype/websdk/gettingstarted

    Can you please let me know from where I can download the SDK.

    Thanks in Advance

Post a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.