Permission error while trying to access Sql from a web method
- by Pavan Reddy
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?