0

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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed

Please help!

Thanks,
Amit

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

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.

1
  • 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 '13 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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