troubleshooting Question

CAS, .NET, and Assembly Calling Permissions... Why won't my permission.Assert() take?

Avatar of OddiC
OddiC asked on
Microsoft SQL Server.NET ProgrammingMicrosoft Development
3 Comments1 Solution847 ViewsLast Modified:
I kept getting a SqlClientPermission error from a custom .NET component I built that calls a local database on my test server. After some research, I decided to use a SqlClientPermission object (code below), however, that has not resolved the issue.

Now (with the code below trying to grant my code Unrestricted access), I get the error:

"Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."

All of my Zones are configured for Full Trust (via the 2.0 Framework Configuration Tool). I cannot figure out what the issue is. Any and all suggestion, references, and help are very greatly appreciated. There has got to be a way to fix this... but I can't see it!!!  :)

Thanks a ton in advance.
SqlClientPermission permission = new SqlClientPermission(PermissionState.Unrestricted);
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros