none
Webpart requires a higher trust in the web configuration file

    Question

  • Hello,

    I have installed the CodePlex RSS Viewer supplied by Phil Wicklund and am getting an error when rendering the webpart:

    Permission Denied, this webpart requires a higher trust in the web configuration file. 

    According to the installation instructions I need to:


    1.       The solution requires either “Full” trust in the web.config (search on “trust level=” – WSS_Medium may be enough…) of the web application that you’re adding it to or the assembly needs to be I the GAC (c:\windows\assembly).

    The problem I am having is that I don't know how to access the webconfig in order to modify this setting.

    Can someone please advise?

    Thank you.

    Sincerely,
    Tim

    jeudi 4 septembre 2008 16:05

Réponses

  •  Just try once by giving Full Trust access to it. Did you made an entry in the safe controls section for the web part? Otherwise it won't show up your custom web part on the page.

    Or you can try one more thing. If its your custom web part then do not strong name it & copy the DLL in the bin folder of your site on the server instead of GAC. In this case just make an entry in the safe controls.
    <SafeControl Assemble="YourAssemblyName" Namespace="NamespaceName" TypeName="*" Safe="True" />

    Now see if it works for you.
    Thanks, Arpit
    jeudi 4 septembre 2008 19:48

Toutes les réponses

  • I have used the Phil Wicklund web part as an example of a free web part in my book out October 2.  (Sams Teach Yourself SharePoint 2007: Using WSS 3.0)

    So I did manage to find the correct web config and specify the correct value!

    As I understand your question you want to know how to "access the webconfig in order to modify this setting" and once there you know what to do.

    You need to be on the server running WSS 3.0 (I presume that's what you are running as MOSS has a RSS Viewer included) and you can then amend web.config using for instance Notepad. There are several copies of web-config. You typically want to find the one for portal 80.   (From memory - I'll have to check this on a machine that has that chapter - I'll come back if that's wrong [or maybe you can confirm it was OK])


    P.S. (added later) - the web.config \80 is the one to amend.
    • Modifié Mike Walsh FIN jeudi 4 septembre 2008 16:41 P.S added after checking
    jeudi 4 septembre 2008 16:32
  • Hi Mike,

    Thanks for your comments!

    So what I did was to go into the IIS MMC for the web site and attempted to access teh webconfig file located under the root.  Unfortunately the webconfig file was greyed out and would not allow me to access it.

    Am I going about this the wrong way?

    Thank you again for your help.

    Sincerely,
    Tim
    jeudi 4 septembre 2008 17:02
  • Hi again Mike,

    I was able to get to the file by pulling up properties of the webconfig in IIS MMC.  I then went to file and modified the following line of code:
    <trust level="wss_custom" originUrl="" />
    <trust level="wss_custom" originUrl="WSS_Medium" />

    Did you have to make the mod somewhere else in the webconfig?

    Unfortunately this did not have any positive effects on my issue.  The webpart is still giving me the same error.

    Any thoughts you could provide would be appreciated.

    Sincerely,
    Tim
    jeudi 4 septembre 2008 17:20
  •  Just try once by giving Full Trust access to it. Did you made an entry in the safe controls section for the web part? Otherwise it won't show up your custom web part on the page.

    Or you can try one more thing. If its your custom web part then do not strong name it & copy the DLL in the bin folder of your site on the server instead of GAC. In this case just make an entry in the safe controls.
    <SafeControl Assemble="YourAssemblyName" Namespace="NamespaceName" TypeName="*" Safe="True" />

    Now see if it works for you.
    Thanks, Arpit
    jeudi 4 septembre 2008 19:48
  •  Here is a file on 'Code Access Security in SharePoint 2007 for Administrators'

    http://www.combined-knowledge.com/Downloads/Code%20Access%20Security%20in%20SharePoint%202007%20for%20Administrators.pdf

    It should answer all of your questions on Code Access Security.
    Shannon Bray - MCT, MCPD, MCTS, MCITP
    vendredi 5 septembre 2008 02:01
  • For those with Sharepoint 2010 Foundation and trying to use this webpart.. Good news, it will work using the suggested install method, but for some reason the entry placed in the web.config for SafeControl during the install causes the error provided in this post once you apply the webpart and try to render a feed:
    "Permission Denied, this webpart requires a higher trust in the web configuration file. "

    To resolve simply remove the SafeControl entry provided for this webpart in that file and replace with the Safe Control mentioned by Arpit above, replacing with the appropriate AssemblyName and NameSpaceName.

    <SafeControl Assemble="YourAssemblyName" Namespace="NamespaceName" TypeName="*" Safe="True" />

    If you take the default install method provided by Phil Wicklund then your entry should look like the one I used here:
    <SafeControl Assembly="PhilWicklund.com.RSSReaderWebPart" Namespace="PhilWicklund.com.RSSReaderWebPart" TypeName="*" Safe="True" />

    I know that I had to complete the above step to make it work.  But I had also copied the .dll from the /bin directory to the /assembly directory prior to, but reluctant to remove it, just to test.. So if the above does not resolve the issue, try copying the associated .dll to the assembly directory and you should be in business.  Webpart works for me.. Hate that Microsoft removed this webpart from the base SP package, but this is a great substitute.  Thanks..

    • Proposé comme réponse lightfju mercredi 1 juin 2011 16:27
    mercredi 7 juillet 2010 17:36
  • Hello,

    I have installed the CodePlex RSS Viewer supplied by Phil Wicklund and am getting an error when rendering the webpart:

    Permission Denied, this webpart requires a higher trust in the web configuration file. 

    According to the installation instructions I need to:


    1.       The solution requires either “Full” trust in the web.config (search on “trust level=” – WSS_Medium may be enough…) of the web application that you’re adding it to or the assembly needs to be I the GAC (c:\windows\assembly).

    The problem I am having is that I don't know how to access the webconfig in order to modify this setting.

    Can someone please advise?

    Thank you.

    Sincerely,
    Tim

    I had the same problem but when I changed the trust level to FULL, I encountered a different error. "The operation has timed out." Is this a webpart problem or the RSS itself?

    Thank you in advance!

    mercredi 27 juin 2012 13:08