views:

237

answers:

1

I created an assembly containing WCF service code and dropped into another web project. When I try to invoke a service method, I get the following inner exception:

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

Why this is happening? My newly created assembly lives inside the ASP.NET /bin folder along with other assemblies. At this level, should the database not know or care whether it is being called from a web service or from a normal call? How would it know that my assembly is foreign? How do I resolve this issue?

A: 

Are you running in at least medium trust?

Mark Brackett
How do I tell and why are the built-in assemblies not having similar issues? Why is my assembly being treated like a second class citizen?
Joel Rodgers
@joebeazelman - http://blogs.msdn.com/dmitryr/archive/2007/01/23/finding-out-the-current-trust-level-in-asp-net.aspx
Mark Brackett