[RESOLVED] Connection String Problem
Never entirely sure if these questions belong in Database forum or the language it's written in but....
I've never had this error before and for the life of me can't fix it. The error is
Code:
Additional information: Request for the permission of type
System.Data.SqlClient.SqlClientPermission, System.Data, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
and my connection string is
Code:
"Server=mh3-
sqlrpt01;Database=Sales_Campaign;User
ID=SCUser;Password=******;Trusted_Connection=False"
I've also tried
Code:
"Server=mh3-sqlrpt01;Password=******;Persist
Security Info=False;User ID=SCUser;Database=Sales_Campaign"
but both give the same error.
Any help greatly appreciated as I'm stuck at this point and can't get any further.
Re: Connection String Problem
Are you performing your database calls in an external class library?
Re: Connection String Problem
That would be code access security. I'm assuming you're using a web application? If so, it's probably running under a trust level below full. Have a look at http://msdn.microsoft.com/library/de...l/THCMCh08.asp - should help you resolve the problem.
Re: Connection String Problem
It was in an external class and it's not a web app it's a console app.
Cheers for info axion_sa although not exactly the same thing it pointed me in the right direction and i managed to get it working by messing around with the secruity levels in the code groups.
Not entirely clear why yet though but it was at a clients company and who knows how their systems are set up (the system admins there certainly didn't).