Is there a way to overrule the returnUrl when you log in?
What i want is to return to another url when i log in. And still be able to use the returnUrl after that.
When there is a returnurl querystring in the url. I removed it and saved it in a session. Then when i land on another site. I set a timeout jquery script to reload the current page with a new returnurl querystring and remove the current session.
Then it stays on the page i want, and download the file.
If you change the name of returnurl to redirecturl or something that should help. It's because this property was based on the asp:login control that was used in webforms and that would handle returnurl out of the box.
Media Protect Return Url Issue
Hello.
Using Media Protect 1.5.1.0
Is there a way to overrule the returnUrl when you log in? What i want is to return to another url when i log in. And still be able to use the returnUrl after that.
When i try to download a file at https://www.website.com/media/package.zip i get redirected to https://www.website.com/login/?returnurl=%2fmedia%2f214%2fpackage.zip and thats what is should do.
But when i return Redirect("/member/?returnurl=%2fmedia%2f214%2fpackage.zip") in my login SurfaceController, it starts to download the file and stay on https://www.website.com/login/?returnurl=%2fmedia%2f214%2fpackage.zip.
Now if i manuelly type in /member/?returnurl=%2fmedia%2f214%2fpackage.zip, it removes the returnurl and download the file as it should.
Any idear?
Hi Bo,
Not sure why it would not redirect to the page you specified. This was the old url passing method of aspx controls.
From what version is that behavior updatet?
Since Umbraco changed from webforms to MVC it has changed.
Now i downloaded the newest version of media protect 1.6.2. To try and see if there was a different.
What i notice now is that if i type in /member/?returnurl=/somefile/ it goes to login page everytime. Even if the member is logged in.
Is there a way to override this behavior?
It does however download the file as it should ;)
I solved it with a hax.
When there is a returnurl querystring in the url. I removed it and saved it in a session. Then when i land on another site. I set a timeout jquery script to reload the current page with a new returnurl querystring and remove the current session.
Then it stays on the page i want, and download the file.
Hi Bo,
If you change the name of returnurl to redirecturl or something that should help. It's because this property was based on the asp:login control that was used in webforms and that would handle returnurl out of the box.
Best,
Richard
is working on a reply...