programad
programad

Reputation: 1311

Windows Phone User Authentication

I have this web app created using MVC3 and need to make a Windows Phone 7.1 app to get information from it.

I have some questions about this:

  1. How can I authenticate users on the first app page? Maybe a service or just MVC an action that recieves username and password and validates against the ASP.NET Membership system?

  2. How can I retreve data from the application? I'm imagining that I'll have to create a web service or just use an MVC action that returns JSON. Can external applications access normal actions or it really needs to be an webmethod?

Thanks everyone!

Upvotes: 1

Views: 590

Answers (2)

Efe Kaptan
Efe Kaptan

Reputation: 465

Take a look at asp.net web api http://www.asp.net/web-api

Upvotes: 1

Darin Dimitrov
Darin Dimitrov

Reputation: 1039140

How can I authenticate users on the first app page? Maybe a service or just MVC an action that recieves username and password and validates against the ASP.NET Membership system?

Yes, controller action taking a username and password and querying your membership provider seems like a good approach.

How can I retreve data from the application? I'm imagining that I'll have to create a web service or just use an MVC action that returns JSON. Can external applications access normal actions or it really needs to be an webmethod?

You can access any action returning anything from your Windows Mobile application. You just send an HTTP request. If your action returns JSON it might just be a little easier for the client application to exploit the data. If the controller action returned a view (and thus HTML) you would have to do HTML scraping on the client which could be a little more challenging than parsing JSON.

Upvotes: 1

Related Questions