Sharepoint Error Running Notes

June 4, 2009

SharePoint Error:

Request for the permission of type ‘System.Data.SqlClient.SqlClientPermission, System.Data, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089’ failed.

Solution: (Source:

That might be related with the trust level located in the web.config file.

Go to the web.config file and locate the wss_mediumtrust.config file location, usualy you can find it under c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\config\

In the wss_mediumtrust.config file locate the <SecurityClass Name=”SqlClientPermission”
Description=”System.Data.SqlClient.SqlClientPermis sion, System.Data, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089″/>, copy and paste it in to the <SecurityClasses> node of

In the PermissionSet section of this configuration file, add the following:
Find in wss_mediumtrust.config: <IPermission version=”1″ Unrestricted=”true”/>, copy and paste it in to the a <PermissionSet> node of wss_minimaltrust.config.

It has risen one more error: LINQ

Error: field access exception was unhandled by user code


In web.config file under system.web tag add this   <

trust level=Full originUrl=“” />