Click here to Skip to main content
15,883,901 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi,

I am trying to connect from my Windows Phone 7 app to the MS Azure Database.
This database is suppose to also be used on a website that i have did.
Is it possible?
Thanks!
Posted
Updated 15-Aug-12 18:32pm
v2

1 solution

You can (and I do) use SQL Azure as a back end for my phone apps. The issue that you will find is that a setting on SQL Azure is the IP addresses that the database is expecting to get contact from. You probably won't want to open that up for everyone.

What I have done is to make a small WCF service in a compute instance and used EF to talk to the database directly. This way the phone app can just call the service and the service calls into the database. This simplifies many things and also allows you to use that same service on a website or any other phone project as well. I have mine running on iOS, Android, WP7, and Windows 8 now.

Let me know if you want more information, I have given this as a talk in Boston at a code camp before.
 
Share this answer
 
Comments
[no name] 16-Aug-12 16:15pm    
*cough* article *cough*

5
Steve Maier 16-Aug-12 16:25pm    
Yea, I should do one on it since I have all the sample code and all of the slides from my presentation. Just have to remind myself to do it later after I resubmit my win8 app with the release bits.
xbolslock 16-Aug-12 19:28pm    
Hi! Ya that would be good if U can share with me more! I am having trouble in just connect from the WP to the azure. If there's any faster way pls do share! And I think being able to share with other platform as well could be one future possibility for my app too. So pls share!! Thanks!! :)
Steve Maier 17-Aug-12 10:04am    
I started on the article last night and will have it done over the weekend. Want to make sure it is good enough.
xbolslock 20-Aug-12 21:36pm    
is it up yet?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900