.NET 2.0和MySQL在中信任模式 [英] .NET 2.0 and MySql in medium trust mode

查看:123
本文介绍了.NET 2.0和MySQL在中信任模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何从ASP.NET 2个网站,在中信任模式访问MySQL?我的ISP不会允许我的网站下的完全信任运行,我已经尝试了许多(如果不是全部)的MySQL API来连接到数据库。

how do i access Mysql from an ASP.NET 2 site in medium trust mode? My ISP wont allow my site to run under full trust and i've tried many(if not all) mysql apis to connect to the db.

在任的SocketPermission或FileIOPermission的错误所有的结果。我甚至试图重写信任我的web.config设置。

All result in either SocketPermission or FileIOPermission errors. i have even tried overriding the trust setting in my web.config.

任何想法?

推荐答案

让他们把MySQL的组件在GAC中。这是与第三方数据库和中等信任一个常见的​​问题。

Ask them to put the MySQL assemblies in the GAC. This is a common issue with third-party databases and Medium Trust.

我要补充一点,你将不得不甜言蜜语他们。他们将需要相信他们将被安装到不破坏他们的服务器软件。所以你需要解释,它的成熟的软件,并给他们的URL站点。

I'll add that you're going to have to sweet talk them. They're going to need to trust the software they're going to be installing to not destroy their servers. So you'll need to explain that it's established software and give them the URL to the site.

另一种选择是让他们稍微改变信任区域的状态。这看起来有点可疑的多,但它不涉及触摸GAC。

The other option is to get them to alter the state of the trust zone slightly. This looks a little more suspicious but it doesn't involve touching the GAC.

这篇关于.NET 2.0和MySQL在中信任模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆