如何在中等信任模式下运行MySQL? [英] How do I run MySQL in medium trust mode?
问题描述
我使用的.NET Framework 4.0和MySQL。我的服务提供商可以让我跑我在中等信任模式的网站。当我主持我的网站,会生成以下错误:
I am using .NET Framework 4.0 and MySQL. My service providers allows me to run my website in medium trust mode. When I host my site, the following error is generated:
Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
要解决这个问题,我已经通过<一个了href=\"https://rbrundritt.word$p$pss.com/2010/09/18/mysql-net-4-entity-framework-and-medium-trust-hosting-environments/#comment-1471\"相对=nofollow>这些 <一个href=\"http://www.marthijnvandenheuvel.com/2011/04/14/fix-net-4-socketpermission-for-mysql-driver-in-medium-trust/\"相对=nofollow>链接以中等信任模式运行MySQL。
To overcome this, I have gone through these links to run MySQL in medium trust mode.
当我用code从这些链接,但是,我的code正常工作与SELECT查询,但是当我使用一个INSERT查询,会生成以下错误:
When I use the code from those links, however, my code works fine with SELECT queries, but when I use an INSERT query, the following error is generated:
Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
我该如何解决这个问题呢?
How can I solve this problem?
推荐答案
我怀疑这是.NET 4.0新的实现,它是使用反射是一个没有没有为中等信任环境。
使用previous版本,我使用的6.5版与GoDaddy和它工作得很好。
I suspect that this is new implementation for Net 4.0 and it is using reflection that is a no-no for medium trust enviroment. Use a previous version, I am using version 6.5 with godaddy and it is working just fine.
这篇关于如何在中等信任模式下运行MySQL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!