我使用的是.NET Framework4.0和MySQL。我的服务提供商允许我在中等信任模式下运行我的网站。当我托管我的网站时,生成了以下错误:
Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. 为了克服这个问题,我通过these links在中等信任模式下运行MySQL。
但是,当我使用这些链接中的代码时,我的代码可以很好地处理SELECT查询,但是当我使用INSERT查询时,会生成以下错误:
Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.我该如何解决这个问题?
发布于 2012-07-31 10:48:32
我希望下面的选项能帮助你:
发布于 2012-07-31 14:51:30
我怀疑这是NET4.0的新实现,它使用了反射,这是中等信任环境的禁忌。使用以前的版本,我正在使用版本6.5和godaddy,它工作得很好。
https://stackoverflow.com/questions/11628206
复制相似问题