Request for the permission of type 'System.Data.SqlClient.SqlClientPermission failed
来源:互联网 发布:加盟淘宝诈骗立案判刑 编辑:程序博客网 时间:2024/06/01 10:17
在MOSS中增加一个aspx页面,aspx页面中有访问另一个sql server数据库,在相应端口的web.config中加入connectionstring后,打开页面报错:
Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Fix:
1.Open wss_mediumtrust.config & wss_minimaltrust.config usually (C:\Program Files\Common files\Microsoft Shared\Web Server Extensions\12\config\) look in your web.config file for the exact
path.
2.Find in wss_mediumtrust.config: <SecurityClass Name="SqlClientPermission" Description="System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
Copy and paste it into the <SecurityClasses> node of wss_minimaltrust.config.
3.In the PermissionSet section of this configuration file, add the following:
Find in wss_mediumtrust.config:
<IPermission class="SqlClientPermission" version="1" Unrestricted="true"/>
Copy and paste it into the <PermissionSet> node of wss_minimaltrust.config.
解法:
1. 找到wss_mediumtrust.config 和wss_minimaltrust.config 两个文件,正常在 C:\Program Files\Common files\Microsoft Shared\Web Server Extensions\12\config\ 中
2. 复制wss_mediumtrust.config文件中的
<SecurityClass Name="SqlClientPermission" Description="System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
到 wss_minimaltrust.config 中相应位置,在<SecurityClasses> 节点下
3. 复制wss_mediumtrust.config文件中的
<IPermission class="SqlClientPermission" version="1" Unrestricted="true"/>
到 wss_minimaltrust.config 中相应位置,在<PermissionSet> 节点下
参考:
http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/e3e73552-6328-4434-b144-b267b9fa5860/
- Request for the permission of type 'System.Data.SqlClient.SqlClientPermission failed
- request for the permission of type system.net.webpermission ....... is failed
- Request for the permission of type 'SecurityPermission' failed.
- 读取数据库 System.Data.SqlClient.SqlClientPermission 解决方法
- System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermi
- System.Data.SqlClient.SqlException: Login failed for user
- SqlConnection new 的時候,报:“The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception.”
- 请求“System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”类型的
- System.Data.SqlClient.SqlException: Login failed for user 'IIS APPPOOL\DefaultAppPool' in IIS7
- The provider for invariant name 'System.Data.SqlClient' is specified multiple times in the applicati
- An error occurred during local report processing.Failed to load expression host assembly. Details: Request for the permission of
- 请求“System.Data.SqlClient.SqlClientPermission,System.Data,Version=2.0.0.0,Culture=neutral,PublickeyToken=b77a5c561934e089”类型的权限已失
- system.data.sqlclient
- system.data.sqlclient
- System.Data.SqlClient.SqlError: The backup set holds a backup of a database other than the existing ‘dbName’ database
- adb remount of system failed: Permission denied
- remount of system failed: Permission denied
- 未处理 System.Data.SqlClient.SqlException
- UNIX系统下监视磁盘空间和使用情况
- spring中基于BeanFactoryAware动态替换指定的bean
- 【2011-11-6截稿EI、ISTP检索】2011年机电一体化与应用力学国际会议
- Objective-C语法之Object对象的那些事儿(五)
- php数据库连接
- Request for the permission of type 'System.Data.SqlClient.SqlClientPermission failed
- 有效的使用和设计COM智能指针——条款6:尽量以智能指针替换接口指针
- 不能以根用户身份运行 Google Chrome 浏览器
- Windows下svn服务器的安装
- Linux下不同颜色命de文件类型 以及重要de配置文件
- ubuntu下重启apache、mysql
- 笔记
- uploadify参数说明
- PHP/MySQL三日通