none
Error on function Request.IsAuthenticated in VS2015

    Question

  • I am converting a VS2012 web project (in C#) to VS2015. When I run the process in VS2015, it is giving me an error when it gets to the following code (it had worked fine in VS2012):

    if (!Request.IsAuthenticated)
    {
    throw new SecurityException("Please authenticate.");
    }

    The error is:

    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: Please authenticate.

    Is there different code to accomplish this in VS2015?

    Thanks.

    Monday, June 13, 2016 4:50 PM

Answers