Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nick Schweitzer 4 posts 24 karma points
    Mar 15, 2013 @ 18:31
    Nick Schweitzer
    0

    Return URL Still appearing when using Request Events

    I've written a custom event handler for the FileRequesting event. This checks particular properties on the Member to make sure they match custom properties on the Media item. If they don't match, I want to deny access. I have this working great, except when they don't match, I'm getting a Redirect Loop error in Chrome.

    I set the following in the code when Access should be denied:

    e.Cancel = true;
    e.RedirectPage = "/access-denied.aspx";

    However, in Chrome, it's going to the following URL:
    /access-denied.aspx?returnurl=%2fmedia%2f4194%2fwebinar.pdf

    I went into the mediaconfig.config file and set the following
    <disableReturnUrl>true</disableReturnUrl>

    That doesn't seem to be working, maybe because its from the Event code instead of just strictly through the standard Media Protect mechanism? For whatever reason, it's redirecting to access-denied and then immediately trying to take someone back to the media item which they still don't have access to, causing the redirect loop.

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Mar 16, 2013 @ 07:04
    Richard Soeteman
    0

    Hi Nick,

    Is this behaviour only when using events? I think it's a chrome issue. I have build the redirect myself  because some browsers redirected and some didn't. If you can let me know if it's only event related, I think not btw. But it could be that only the event is causing a redirect loop.

    Anyway hope to hear from you then I can fix the issue.

    Thanks,

    Richard

     

     

  • Nick Schweitzer 4 posts 24 karma points
    Mar 18, 2013 @ 20:58
    Nick Schweitzer
    0

    Before I reported this issue originally, I know I had touched the web.config in order to cause the site to recycle after I made the change to the boolean to turn off the returnUrl. It seems to be working properly now... so must have been a caching issue on either the Macro or the site or something. Thanks

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Mar 18, 2013 @ 21:03
    Richard Soeteman
    0

    Hi Nick,

    Great to hear it's working now but will make a note for myself to try to reproduce the issue in the not too far future.

    Thanks for getting back.

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft