none
System.Security.SecurityException: Request failed. - Security Exception

    Question

  • Hello,

    I've a publishing portal with lot of custom pages and page layouts. I've code behind for the pages and page layouts. I created a custom CAS policy and added it in the trust level in the configuration file. But when i moved the site to another server i'm getting security exception. I dint change anything to the CAS file. Then i tried giving the trust level as full. Even that dint work.

    <securityPolicy>
          <trustLevel name="WSS_Medium" policyFile="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\config\wss_mediumtrust.config" />
          <trustLevel name="WSS_Minimal" policyFile="C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\config\wss_minimaltrust.config" />
    </securityPolicy>

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

    Any ideas?

    Thank you.

    Regards,
    Raghavendra
    Tuesday, October 13, 2009 9:31 AM

Answers

  • I have seen this before..

    Make sure that you are in the correct web applications config file and that you didn't configure one of the "global" config files for .net.

    Try using a "backed" up earlier config file just to make sure you are using the correct folder(for the web application).

    Cheers,
    Daniel Bugday

    Web: SharePoint Forum Blog: Daniel Bugday's SharePoint Blog

    • Marked as answer by N L V Monday, October 19, 2009 11:16 AM
    • Unmarked as answer by N L V Friday, October 23, 2009 6:16 AM
    • Marked as answer by N L V Saturday, October 24, 2009 10:02 AM
    Tuesday, October 13, 2009 11:24 AM

All replies

  • Hi Raghavendra,

    i can't see that you configured the custom CAS file in the given web.config..

    Also, try an IISReset..

    Cheers,
    Daniel Bugday

    Web: SharePoint Forum Blog: Daniel Bugday's SharePoint Blog

    Tuesday, October 13, 2009 11:10 AM
  • Thanks for your reply.

    As i said i first tried giving my custom CAS policy. But it dint work. So i just tried to give trust level = Full. It dint work too. I have done IISRESET after configuring everything.

    Here are the error details.
    ______________________________________________________________________________

    Security Exception
    Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

    Exception Details: System.Security.SecurityException: Request failed.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

    Stack Trace:


    [SecurityException: Request failed.]
       Microsoft.SharePoint.Publishing.PublishingLayoutPage..ctor() +38
       ContactUsSite.ContactUs..ctor() +5

    ______________________________________________________________________________

    Any ideas?

     

    Regards,
    Raghavendra
    Tuesday, October 13, 2009 11:18 AM
  • I have seen this before..

    Make sure that you are in the correct web applications config file and that you didn't configure one of the "global" config files for .net.

    Try using a "backed" up earlier config file just to make sure you are using the correct folder(for the web application).

    Cheers,
    Daniel Bugday

    Web: SharePoint Forum Blog: Daniel Bugday's SharePoint Blog

    • Marked as answer by N L V Monday, October 19, 2009 11:16 AM
    • Unmarked as answer by N L V Friday, October 23, 2009 6:16 AM
    • Marked as answer by N L V Saturday, October 24, 2009 10:02 AM
    Tuesday, October 13, 2009 11:24 AM
  • Thanks for your reply.

    I've cross checked it a couple of times. I'm modifying the right configuration file. Something else is going wrong. I have done this before and it perfectly worked.

    Couple of silly doubts -

    1. Is that Full or FULL? Is that case sensitive?
    2. Will the trust level = full have any corresponding file in the config folder like wss_minimum or wss_medium?

    Thank you.
    Regards,
    Raghavendra
    Tuesday, October 13, 2009 11:32 AM
  • I want to allow access to everything. I know its not advisory. But tell me how to configure that. I gave

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

    But its not working. I cross checked lot of times whether i'm modifying it in the current web.config file (config file of the web application).

    Any ideas?
    Regards,
    Raghavendra
    Monday, October 19, 2009 7:18 AM
  • I want to allow access to everything. I know its not advisory. But tell me how to configure that. I gave

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

    But its not working. I cross checked lot of times whether i'm modifying it in the current web.config file (config file of the web application).

    Any ideas?
    Regards,
    Raghavendra

    Okie. FULL was case sensitive. It worked.

    Regards,
    Raghavendra
    Monday, October 19, 2009 11:15 AM