Permission error while trying to access Sql from a web method

Posted by Pavan Reddy on Stack Overflow See other posts from Stack Overflow or by Pavan Reddy
Published on 2010-04-30T07:21:58Z Indexed on 2010/04/30 7:27 UTC
Read the original article Hit count: 245

Filed under:
|
|

I created a web service which has a few web methods which inturn performs inserts/updates/select from a Sql Server and return non-primitive types. To test the web methods I tried using the Open source tool .net web service studio

When I test for the web methods, I get the following error -

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

I searched for solutions and I tried a lot of approaches like setting up the permission levels, the trust level in config file etc. But the error still persists.

Can anyone tell me what could be the reason for this error? I have tried toggling the permissions at all levels - Sql Server, web service etc. How can I fix this error?

© Stack Overflow or respective owner

Related posts about c#

Related posts about web-services