Traitée Deploy a visual web part to WebApplication

  • Dienstag, 20. März 2012 06:41
     
     

    Dear All,

    I have developed a visual web part, then I deploy it into WebApplication (C:\inetpub\wwwroot\wss\VirtualDirectories\[Port]\bin). when I add this visual web part to my SharePoint page then it raise an exception "System.Security.SecurityException: Request for the permission of type ‘Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ failed".

    Can anyone help me to resolve this problem?

    Thanks in advance,

    Phu.


    • Bearbeitet Phu Dang Dienstag, 20. März 2012 06:44
    •  

Alle Antworten

  • Dienstag, 20. März 2012 07:47
     
     Beantwortet

    Hey,

    I think this solution will work put.Give a try

    Solution: Add this line to your applications web.config
    file, system.web section:

    <trust level=”Full” originUrl=”" />

    or

    <trust level=”WSS_Medium” originUrl=”" />

    Let me know if the solution worked or not :)


    "The Only Way To Get Smarter Is By Playing A Smarter Opponent"

    • Als Antwort markiert Shimin Huang Freitag, 30. März 2012 06:52
    •  
  • Sonntag, 1. April 2012 02:30
     
     

    Thanks Ravi, it worked ok.

    Thanks again,

    Phu Dang.