.NET 2.0 and MySql in medium trust mode

狂风中的少年 提交于 2019-12-08 07:39:33

问题


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.

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

Any ideas?


回答1:


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

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.

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.



来源:https://stackoverflow.com/questions/217989/net-2-0-and-mysql-in-medium-trust-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!