Archive for March 19th, 2006

Calling MySQL .NET Provider from Partially Trusted Code

Many Web Hosts are facing this issue of trying to provide access to MySQL .NET provider from medium trust or custom trust code. For example using MySQL.Data objects in ASP.NET 2 from partially trusted code results in the following error.   Exception Details: System.Security.SecurityException: That assembly does not allow partially trusted callers. The solution to get around this problem is easy because the source code of MySQL .NET provider is included in the download. The following steps need to be followed.

  • Locate AssemblyInfo.cs and open it in your favorite editor.
  • Add [assembly:AllowPartiallyTrustedCallers] at an appropriate place in the file and save it.
  • Recompile and Re-Deploy MySQL.Data.dll

 Good Luck!

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Fark
  • Furl
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • YahooMyWeb
  • Spurl

1 comment March 19th, 2006


Calendar

March 2006
M T W T F S S
« Dec   May »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Posts by Month

Posts by Category



Join the Blue Ribbon Online Free Speech Campaign
Join the Blue Ribbon Online Free Speech Campaign!