Announcement

Collapse
No announcement yet.

Connecting to mySql from .Net

Collapse

Ads on showthread pages

Collapse
This topic is closed.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Connecting to mySql from .Net

    WordPress Hosting on SSD Servers
    What is the best way for me to connect to mySql connect from my .Net application?

    I am using MySql.Data.dll.

    When I try and make a database connection I get this warning:
    System.Security.SecurityException: That assembly does not allow partially trusted callers.

    I would appreciate any recommendations and other Best Practices.

    Thanks,

  • #2
    Check various mysql connection strings at http://www.connectionstrings.com/?carrier=mysql
    Jason
    ---------
    Technical Support Group
    AccuWebHosting.Com
    Windows Website Hosting
    Linux Website Hosting

    Comment


    • #3
      ASP.Net Hosting starts @ $3.18/Mo.
      Ralph,

      It seems that your hosting provider has partial trust enabled on the server for ASP.NET, which is good as far security is concerned. So, i would recommend you to write down your code acceptable in partial trust environment.

      Make sure that the MySQL provider is not strongly signed (which would give an implicit LinkDemand for FullTrust on every public and protected method of every publicly visible class), as it refuses to be called by partially trusted code. In this case, you should recompile the MySql.Data.dll without strongly signing it.

      Let me know if that works for you.

      Thanks,

      Comment

      Working...
      X
      Sign up for a News Letter Click here to sign up