1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / You are not authorized to 'View a page' ('Pages')

You are not authorized to 'View a page' ('Pages')

13 posts, 0 answered
  1. Chris
    Chris avatar
    11 posts
    Registered:
    07 Mar 2011
    20 Apr 2011
    Link to this post
    After upgrading from 4.0 sp1 to 4.1 I'm getting the above error.

    My site is setup as follows:

    root\
    root\members
    root\members\module1
    root\members\module1\page2
    root\members\module2
    root\members\module2\page2

    Inside of SiteFinity, I have "Allow" page permissions for  "Authenticated" Role to the \root\members and below folder so that I can redirect the users to a login page.    I have "Deny" page permissions for "Anonymous"  Role.

    Firebug is showing this as an error code of 500 "Internal Server Error".  Prior to upgrade, I was getting a 403 error and in my web.config I was sending this error code to my login page.

    <authentication mode="Forms">
         <forms loginUrl="~/login" defaultUrl="~/Members/" timeout="60" />
    </authentication>

    <customErrors mode="RemoteOnly">
            <error statusCode="403" redirect="~/login" />
    </customErrors>

    The exception details on the page are as follows:

    [UnauthorizedAccessException: You are not authorized to 'View a page' ('Pages').]
       DynamicModule.ns.Wrapped_OpenAccessPageProvider_c8cea08814a147c9811230eacc92881d.GetPageNode(Guid id) +253
       Telerik.Sitefinity.Modules.Pages.PageManager.GetPageNode(Guid id) +46
       Telerik.Sitefinity.Web.SiteMapBase.GetFirstPageDataNode(PageSiteNode node) +144
       Telerik.Sitefinity.Web.PageRouteHandler.GetHttpHandler(RequestContext requestContext) +128
       System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) +8890312
       System.Web.Routing.UrlRoutingModule.OnApplicationPostResolveRequestCache(Object sender, EventArgs e) +86
       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
    


    Inside of the SiteFinity log file, here is what I have.

    ----------------------------------------
    Timestamp: 4/20/2011 3:44:25 PM

    Message: HandlingInstanceID: 76b988d8-a310-4834-9752-a2950aecdada
    An exception of type 'System.Web.HttpException' occurred and was caught.
    ------------------------------------------------------------------------
    04/20/2011 11:44:25
    Type : System.Web.HttpException, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Message : This is an invalid webresource request.
    Source : System.Web
    Help link :
    WebEventCode : 0
    ErrorCode : -2147467259
    Data : System.Collections.ListDictionaryInternal
    TargetSite : Void System.Web.IHttpHandler.ProcessRequest(System.Web.HttpContext)
    Stack Trace :    at System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    Additional Info:

    MachineName : CLANGSTONWIN7
    TimeStamp : 4/20/2011 3:44:25 PM
    FullName : Telerik.Sitefinity.Utilities, Version=4.1.1339.0, Culture=neutral, PublicKeyToken=b28c218413bdf563
    AppDomainName : /LM/W3SVC/3/ROOT-3-129477872544636101
    ThreadIdentity : admin
    WindowsIdentity : IIS APPPOOL\ASP.NET v4.0
    Requested URL : /WebResource.axd?d=jezYWHXzj-Gbn-Kj2olrljs9WCtDMsSpaH4WS13rnlcGAi7BXWHQBW83epsjBvONjA7evUR6xE29OAEoGhNivIdplRIKwaxbEkXBDsN6SpPwH6zd524NTrbVg1pj-ImlqAecNW4oyy45W0dqZuEtH2azQPpYj-d_9qIy6gBZwlHV3efK_4GQi5s-Ib-4V139hG1TTkaMcQna34PIvCcHrfwfQOcGjL_CxIULlaKCYtA1&t=634388057849460594


    Category: ErrorLog

    Priority: 0
    EventId: 90000
    Severity: Error
    Title:Enterprise Library Exception Handling
    Machine: CLANGSTONWIN7
    App Domain: /LM/W3SVC/3/ROOT-3-129477872544636101
    ProcessId: 5756
    Process Name: c:\windows\system32\inetsrv\w3wp.exe
    Thread Name:
    Win32 ThreadId:5276
    Extended Properties:
    ----------------------------------------
  2. Abraham
    Abraham avatar
    29 posts
    Registered:
    11 Aug 2010
    22 Apr 2011
    Link to this post
    I am getting the same error:

    You are not authorized to 'View a page' ('Pages').


    I am allowing everyone and disallowing anonymous.  Here's the relevant section of my web.config:
    <authentication mode="Forms">
      <forms loginUrl="~/Activities/ittest/test3"/>
    </authentication>

  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    22 Apr 2011
    Link to this post
    Hello Abraham,

    Can you switch back loginUrl to its default value? The <forms> setting never works - you always get redirected to ~/Login, regardless to what is the specified loginUrl. There is a config section  Sitefinity >> Administration >> Settings >> Advanced >> Security >> Permissions >> Backend you can change the url in LoginUrl and AjaxLoginUrl boxes.  That should allow you to change the backend login.


    All the best,
    Ivan Dimitrov
    the Telerik team

  4. Chris
    Chris avatar
    11 posts
    Registered:
    07 Mar 2011
    25 Apr 2011
    Link to this post
    Ivan,

    Unfortunately, making this change to the settings in the database and restarting IIS I'm still get the same errors. 

    I created a sandbox SiteFinity website starting with a fresh 4.1 installation and I am able to reproduce the same error.

    My website is running locally inside of IIS on a Windows 7 32 bit machine. 

    What else can I look at to resolve this problem?

    Thanks,

    Chris
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    05 May 2011
    Link to this post
    Hi ,

    "I created a sandbox SiteFinity website starting with a fresh 4.1 installation and I am able to reproduce the same error."

    The sandbox websites are not upgraded to the latest version - Q1 release. Can you give me the steps you follow to replicate this issue on a new installation as you wrote.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Chris
    Chris avatar
    11 posts
    Registered:
    07 Mar 2011
    05 May 2011
    Link to this post
    Hi Ivan,

    By "sandbox", what I meant was a completely new setup on my local development machine where I went through the SiteFinity ProjectManager to create a completely new website and database.  I think I may have confused the term "sandbox" because I realize that Telerik will also setup a website where you refer to this as a "sandbox" as well.

    1. What I did was in the c:\program files\telerik\Sitefinity 4.1 folder I clicked on the SiteFinity.exe project manager executable.
    2. I created a new project that I named "Test".  The sitefinity version is 4.1.1339.0
    3. I then setup the same folder structure and permissions as I indicated below:

    root\
    root\members
    root\members\module1
    root\members\module1\page2
    root\members\module2
    root\members\module2\page2

    Inside of SiteFinity, I have "Allow" page permissions for  "Authenticated" Role to the \root\members and below folder so that I can redirect the users to a login page.    I have "Deny" page permissions for "Anonymous"  Role.

    Hope that helps.


    Thanks,

    Chris
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    11 May 2011
    Link to this post
    Hi,

    A user should see this error only if she / he tries to access the restricted page directly. The restricted user should not see any page on the navigation that she / he doesn’t have permissions for.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Chris
    Chris avatar
    11 posts
    Registered:
    07 Mar 2011
    11 May 2011
    Link to this post
    Ivan,

    As you can see from the thread, I stated that prior to my upgrade to 4.1 (was previously running 4.0 SP1) my user was getting a 403 redirection error and was being sent to my login page.  Now I get this big nasty error showing up.

    How am I supposed to work around this issue?

    I have setup logic in my base master page on the load event, but when a hyperlink is clicked, there is no post-back to where my Master Page load event is fired.  The error happens before the master page gets the postback.

    I don't want to have to change every hyperlink to be a LinkButton as this seems unnecessary.

    Maybe I could change the logic to render the hyperlink for the page to be something like "~\login?returnUrl="\members\module" or something to that effect?

    What are your suggestions if I want to prevent a user from accessing a page until they have been authenticated?

    I've asked this many times now in many different ways.  Up until 4.1, the way I had it implemented was working.

    Thanks,

    Chris
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    13 May 2011
    Link to this post
    Hello,

    This is a bug in the product. I have logged it for fixing. The 403 status is not returned. I hope that we will be able to provide a fix in our internal builds before the official release of Q2.


    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  10. Abraham
    Abraham avatar
    29 posts
    Registered:
    11 Aug 2010
    19 May 2011
    Link to this post
    Has there been an internal release that fixes this?  Can you think of any work arounds?  This is really a problem because normally you would want to use links that point directly at a page and have the user automatically redirected to the login page.
  11. Kyle
    Kyle avatar
    7 posts
    Registered:
    14 Apr 2011
    20 May 2011
    Link to this post
    Second that, we need a solution.
    Redirecting to a login page when user does not have access seems like standard, out of box, basic functionality.
    I've hacked into the membership provider authenticate method to redirect to login when a user is not logged in and requesting a page under my ~/Client/* section of the site. This is filthy hacky code and do not want to have to keep it there when we go to production.
    cheers
  12. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    25 May 2011
    Link to this post
    Hello,

    The issue should be fixed in the latest build that we have. You should get 403 status code.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  13. Abraham
    Abraham avatar
    29 posts
    Registered:
    11 Aug 2010
    08 Jun 2011
    Link to this post
    The suggestion from Boyan at http://www.sitefinity.com/devnet/forums/sitefinity-4-x/developing-with-sitefinity/log-in-page-redirection-for-user-without-permissions.aspx was the only thing that worked for me.  To summarize his fix, you add code to global.asax to handle unauthorized exceptions and redirect them. 
13 posts, 0 answered