Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

share|improve this question
    
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

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.

share|improve this answer
    
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. –  AmitKB May 2 '13 at 15:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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