How do I log into a web service that was auto-generated by Azure Mobile Web Services?

103 Views Asked by At

Microsoft's Azure Mobile Web Services lets you download a .NET or JavaScript Service and a client that talks to the Service. These are written in C#, or JavaScript. I chose to get one in C#. There is are several parts in the generated solution

  • A Windows 8.1 desktop client (yourname.Windows)
  • A windows mobile client (yourname.WindowsPhone)
  • A Azure Mobile Web Service (yournameService)
  • A shared .net assembly named (yourname.Shared)

You can right click on yournameService and click Publish and it takes you through a wizard which publishes your application directly from Visual Studio to an Azure server. At some point in the wizard it establishes automatically some rather complex credentials (because you have already logged into an Azure web subscription). Generally you can just click Next, Next, and get it published.

Now you have a webservice, which opens up in your web browser, but which requires you to log in. What I want to know is, how do you know the user name and password used for this login?

 http://yourapp123.azure-mobile.net/help

Then you click "Try it out", and a web browser authentication dialog pops up.

Why is this a problem? So far as a user I have input:

  1. My Visual Studio login credentials,
  2. My connection to Azure (perhaps same, perhaps different as visual studio login)
  3. During wizard I've determined login credentials to publish to Azure, using values I have no idea where they came from, and so I left them alone. These seem to be the only credentials I had any opportunity to enter, and any change from the defaults renders the wizard inoperable, so I'm sure that's not where I enter my user and password.
  4. I created a username and password when I created the Mobile WebService, and these do NOT work when I try to log in.

log into mystery location

1

There are 1 best solutions below

1
On BEST ANSWER

Leave the user name blank. And put in your application key as password. You can find your application key from your Azure portal > Mobile service > manage keys.

The reason being is that AMS uses a Zumo header to decide proper authentication. Which is what the application key is used for. So it's making sure only people or applications which has the application key can access the web service. Hope this helps.