Reputation: 1311
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:
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?
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
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