Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Regarding Web Service in Webpart

  Asked By: Shana    Date: Sep 19    Category: Sharepoint    Views: 656

I created a web service and its working fine in asp.net application.
I want to connect that web service to my web part which i connected to =
While connecting that webservice to my web part,it shows the following =
error :
"Request for the permission of type System.Net.WebPermission, System, =
Version=3D1.0.5000.0, Culture=3Dneutral, =
PublicKeyToken=3Db77a5c561934e089 failed. "
What i hv to do now?.



4 Answers Found

Answer #1    Answered By: Himanta Barthakur     Answered On: Sep 19

I don't know if this is the correct solution, but in my web.config file i did
<trust level="Full" originUrl="" />
and restarted server.....it worked for me.

Answer #2    Answered By: Mansi Revenkar     Answered On: Sep 19

That will work, but it's not recommended as you basically just turned off web
part security by doing that.

Answer #3    Answered By: Lizette Mcconnell     Answered On: Sep 19

later i followed the steps from this article.

Answer #4    Answered By: Rosanna Parrish     Answered On: Sep 19

Yes, Full is a valid setting, but recommending it as a solution in general is a
bad idea security wise. The whole idea of code access security is allow the
creation of permissions sets that give the minimum necessary permissions for
assemblies. By setting it to Full you are removing all restrictions, and
increasing the chances of a misbehaving assembly causing problems or opening
security holes.

Didn't find what you were looking for? Find more on Regarding Web Service in Webpart Or get search suggestion and latest updates.