I have developed an application page for SharePoint 2007 and it works fine. When I tried to connect to SQL Server 2005 database I am getting following error:

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

Please help!


  • How are you connecting to the 2005 database? A data connection? .Net code? could you provide an example?
    – Dave Wise
    May 2, 2013 at 15:52

1 Answer 1


You will need to make sure that either the caller's domain account or the SP application pool account has the proper permissions on the SQL 2005 database. The account used when making the call depends entirely on your code.

  • This issue is not related to accessing a database but cannot use the assembly or not have enough permission to use that assembly. BTW I gave the app pool user access to that database and the problem is same. May 2, 2013 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.