lyndon hughey
lyndon hughey

Reputation: 657

Azure App Service Application Key (where is it) - 2016

I've created an Azure App Service application and pushed it to Azure. Unfortunately, I am unable to find the application key that I should use in my client to create the connection to the service (as seen in the below code ).

 MobileService = new MobileServiceClient(
        "http://xxxx.azurewebsites.net",
        "applicationKeyShouldGoHere");

I've seen a few answers to this question, but all seem to point to authenticating the USER within the client. I want to authenticate the call to the service.

Azure Mobile Services had an application key but I'm unable to find the key for App services. The difficulty is multiplied with the fact that the Azure Portal seems to get modified every couple of months...

Thanks in advance.

Upvotes: 1

Views: 587

Answers (2)

Kedu
Kedu

Reputation: 1370

The new Mobile App Services doesn't need/use any Key.

You need to use Version 2+ of the Microsoft.WindowsAzure.Mobile package on your client.

The older SDK created the MobileServiceClient like this:

new MobileServiceClient(applicationURL, applicationKey)

The new (Version 2+) like this:

new MobileServiceClient(applicationURL)

So there is no need for a key.

Upvotes: 2

Derek
Derek

Reputation: 837

We don't publish Azure App Service in the way as we publish Mobile Services(Actually in new portal, there is no Application Key for Mobile services either).

When publishing Azure App Service, you need to download the publish profile from the portal. Right click the project in VS, and choose Publish.... In the Publish Web wizard,import the publish profile you downloaded. When the wizard completed, the App Service will be published to Azure.

Check web-sites-dotnet-get-started for details.

Upvotes: -1

Related Questions