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:
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.
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.
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
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.
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
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
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
is working on a reply...