cmaduro
cmaduro

Reputation: 1722

Hosting a Silverlight database application that works with MySQL

I have a basic hosting package that gives me access to create a MySQL database. I can of course host silverlight applications on any site. But how can I work with a database from within Silverlight? I cannot run any service on my hosting provider, they only allow php or perl scripts.

Upvotes: 0

Views: 451

Answers (2)

Joel Martinez
Joel Martinez

Reputation: 47749

You can use the C# webclient to make HTTP calls to a PHP page hosted on the server. The PHP page can proxy queries/results between the silverlight client and the mysql database.

remember, just because it's not a SOAP/WCF "service" does not mean that it's not a web service. Look into PHP based REST solutions for some nice alternatives that can easily be invoked via silverlight:
http://www.bing.com/search?q=PHP+REST

Edit: As @Spencer Ruport correctly points out in the comments, you of course have to be wary of the fact that the web service will be exposed to the public, and anyone can easily sniff the http traffic between your silverlight application and the server. This enable them to call your service directly so be sure to think about authentication and what it means in the context of your app/data

Upvotes: 1

mdm20
mdm20

Reputation: 4563

You can use the WebClient class in silverlight to communicate to a php service. Here is the first google result I found: link

Upvotes: 0

Related Questions