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

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.

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.

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.

Related

trying to Deploying asp.net web api to azure app service

i am trying to deploy a asp.net core web api to azure app service
i try signing in with the account i created on azure but it keeps on bring me to the last step
if you find that VS always aksed you to sign in, but you've entered the user name and password, then pls close the publish window, and open it again. I faced the same issue before, so it may help you.

Inability to deploy the WEB Api using Visual Studio

I have created a web API, and now I want to deploy it. Unfortunately, when I try to publish my web API, I need to sign in or create a new account on the App Service step.problematic step
When I try to log in or even create a new account - it accepts it but doesn't allow me to go further and open the App Service settings like this: enter image description here
In my case, it was because I didn't activate any subscription. But in my opinion, instead of just not allowing me to deploy my WEB API, they could also specify the cause.

How To Tell What Subscription a Visual Studio Azure Wep App Will Be Published To

Given a VS web app project that has an existing Azure publish profile is there a way to tell what subscription the selected publish profile will publish the app to? We have such so many subscriptions it's quite time consuming to to use the portals poor blade interface to locate which subscription the app is in. Even opening the SCM site it seems apps know nothing about it's subscription.
As I know, we don't need Azure subscription information to publish our project. What we need is contentPath, ComputerName, UserName& Password when you use msdeploy. The following is the parameters that used to deploy:
.\msdeploy.exe -verb:sync -source:contentPath='E:\code' -dest:contentPath='sub2',ComputerName='https://waws-prod-sn1-047.ftp.azurewebsites.windows.net/msdeploy.axd?site=sub2',UserName='$sub2',Password='key',AuthType='Basic'
If we published project to Azure, we have no easy way to see which subscription it belongs to. I suggest you submit a voice at Azure feedback forum.

Unable to login to Azure Mobile Apps(API Services)

I am trying the new Azure Mobile apps(part of Azure App Services stack), published my mobile service to https://xxxxxxxx-code.azurewebsites.net.
Previously the application key used to work for password(when I click 'try it out') but now it is not allowing me to. Did anything change?
I had to add the MS_ApplicationKey app setting manually in the preview portal to get it working.
Try the Master Key (rather than Application Key). I'll look into whether something has changed, but I just tried the Master Key and that should work.

Is it possible to change connection string on cloud service deploy-time?

I wrote an asp.net mvc 4 web site. For my corporation purpose, I created several publish profiles, in order to publish it on differents azure websites. Each profile changes the connection strings.
It worked very well.
I am now trying to do the same thing with an azure cloud service (I added my web site as a web role in a new cloud service project). But I can't find out how to change the connection string of my web role depending of my cloud service project publish profile at deploy-time.
Is there a way to do such a thing ?
Thanks !
You could store the connection string in the ServiceConfiguration file .cscfg of your Role and then use the following in your code to retrieve the setting:
string connectionString = RoleEnvironment.GetConfigurationSettingValue("myConnectionString");
You can modify the values in the ServiceConfiguration through the Management Portal once deployed.

Resources