Page 1 of 1

Connect to MySQL with Silverlight

Posted: Sat 25 Aug 2012 00:06
by DeepSeaDave
I am trying to use LinqConnect 4 on a web application I am writing in vb.net/Silverlight. I know I am limited to the tcp ports I can use in Silverlight. I am unable to change the port on the MySQL database from the default 3306. What can I do so that people who use my Silverlight Web app can access this database? Is LinqConnect the right tool to use?

Thanks,

Re: Connect to MySQL with Silverlight

Posted: Tue 28 Aug 2012 13:17
by StanislavK
The problem with Silverlight port limitations is a configuration one and is not actually related to the LinqConnect functionality.

As an alternative for changing the port your server uses, you can, e.g., configure forwarding from one of 'allowed' ports to 3306 on the machine where the MySQL server is installed. Port forwarding is discussed in details, e.g., here:
http://stackoverflow.com/questions/1476 ... g-bridging

Re: Connect to MySQL with Silverlight

Posted: Tue 28 Aug 2012 15:13
by DeepSeaDave
In my particular case I am using a MySQL database hosted by GoDaddy.com. I doubt I have any control over what port I can canfigure the DB to use, or implement some sort of server-side port forwarding. I can't believe I'm the only person that has ever tried to do this. I just don't know what to do to get my Silverlight app to talk to the DB!

Re: Connect to MySQL with Silverlight

Posted: Wed 29 Aug 2012 16:14
by StanislavK
We can only recommend you to use one of the following alternatives:
  • negotiate with the hoster so that they either enable port forwarding or install your database on a trusted port;
  • configure your application to be trusted (this needs the certain actions to be done by application users, so this solution will probably suit only if the application is supposed to work in intranet):
    http://msdn.microsoft.com/en-us/library/gg192793.aspx
  • access the database from, e.g., a web service instead of working with it directly from the Silverlight application; in this case, you will have to switch from LinqConnect for Silverlight to, e.g., LinqConnect Professional.

Re: Connect to MySQL with Silverlight

Posted: Wed 05 Sep 2012 04:24
by DeepSeaDave
I apologize for asking such basic questions, but I cannot find any documentation or samples to guide me.

I tried creating a WCF RIA Services Class Library, because this would be the piece running on the server side tha would access the database, right? VB 2012 creates 2 projects: RIAServicesLibrary and RIAServicesLibrary.Web. I'm not sure which project to create my LinqConnect model in. I tried creating on in both projects. Both projects give me the following error when I try to create it: "Error: this template attempted to load component assembly 'Devart.EntityDeveloper.Vs, Version=4.5.240.0, Culture=neutral, PublicKeyToken=09af7300eec23701'"...

The project I am trying to create is Silverlight 5, Framework 4.5, Visual Basic 2012. I have downloaded the trial of LinqConnect for Silverlight. If I can get this to work I'll purchase the full version immediately! But as of right now I cannot figure out how to use your tool to access a MySQL database in my Silverlight web app!

There are no samples or documentation that helps explain how to do any of this. My questions are:
1) Am I using the correct tools (VB2012, Silverlight 5, Framework 4.5)?
2) What types of Silverlight projects/solutions do i need to create to successfully talk to my MySQL database?

Re: Connect to MySQL with Silverlight

Posted: Thu 06 Sep 2012 07:25
by MariiaI
The class library for WCF RIA Services is not a Silverlight application, thus you should use LinqConnect Professional Edition instead of LinqConnect for Silverlight.
You can download the trial version of LinqConnect Professional from http://www.devart.com/linqconnect/download.html

If you have any further questions, feel free to contact us.