我正在使用.NET Framework 4.0和MySQL。我的服務提供商允許我以中等信任模式運行我的網站。當我主持我的網站,會生成以下錯誤:如何在中等信任模式下運行MySQL?
Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
爲了克服這個問題,我已經通過theselinks過在中信任模式運行MySQL。
當我使用這些鏈接的代碼,但是,我的代碼工作正常SELECT查詢,但是當我使用一個INSERT查詢,生成以下錯誤:
Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
我怎樣才能解決這個問題?
這可能有所幫助:http://stackoverflow.com/questions/217989/net-2-0-and-mysql-in-medium-trust-mode – 2012-07-26 17:21:11