Copied to clipboard

Flag this post as spam?

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


  • Roger Sutton 52 posts 124 karma points
    Nov 20, 2012 @ 12:14
    Roger Sutton
    0

    Issues in IIS 6

    Hi,

    For historical reasons I have to use IIS6 on the site I want to protect. I have added PDF to the mapping and it seems to work in that a request for a protected PDF goes to a login page. However, after logging in the page does not redirect to the query string request but simply acts as normal. Am I supposed to add the handler to move on to the requested PDF myself or is it done by the package?

    More concerning is that when I try to link to a non protected PDF I get an error from the server:

    Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.

    I'm not sure at all what is happening here. Do you have any suggestions?

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Nov 20, 2012 @ 16:00
    Richard Soeteman
    0

     

    Hi Roger,

    MediaProtect is meant to run on IIS7 (supported platforms), but I had a customer once that got it working by adding every file extension to the asp.net dl land remove the mimetype octet-stream MIME

    Hope this helps,

    Richard

  • Roger Sutton 52 posts 124 karma points
    Nov 20, 2012 @ 16:13
    Roger Sutton
    0

    Thanks for the reply Richard. The documentatiation in various places seems to say you can run on IIS6, perhaps you could make it a little clearer that some serious tweaking is needed. The link in the manual relating to wildcard handlers is a red herring. The system does seem to work when you point the file types individually at the asp.net handler. You also have to add a line for each type in the web config <httpHandlers> section to default them to a static handler when the file in question isn't a protected file. Also make sure all the web config changes mentioned in the manual are actually there. 

    Did you have an answer for the redirect after login? I can see a querystring added to the login page URL for the protected file but it isn't handled after login. Is that a function of the package, part of the membership API or do I have to handle it?

    For anyone out there who wants media protection this is a good product and well worth the money, even on IIS6. Many thanks.

    Roger

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Nov 21, 2012 @ 09:28
    Richard Soeteman
    0

    Hi Roger,

    Sorry for the documentation. I'll update it but glad you got it working,The thing is that I don't have an IIS6 machine myself that is the reason I'm a little affraid about IIS6.

    Regarding the redirect issue it's an membership functionality indeed. Yesterday I got some extra information regarding that issue. Is that also the case on your machine?  http://our.umbraco.org/projects/website-utilities/media-protect/mediaprotect-feature-requests/36315-Redirect-issue-when-umbracoUseDirectoryUrls-and-addTrailingSlash-are-set-to-true

    Cheers,

    Richard

  • Roger Sutton 52 posts 124 karma points
    Nov 21, 2012 @ 10:27
    Roger Sutton
    0

    Hi Richard,

    Not in this case I'm afraid. The login page before the querystring is a complete URL without a trailing slash. The querystring does contain (encoded) slashes but these are correctly part of the PDF URL. 

    ie.  http://www.nnnnnn.org/board-login.aspx?returnurl=%2fmedia%2f46053%2fagm_1409.pdf ;

    Is there a setting somewhere that allows the redirect functionality or should it just work?

    Regards 

    Roger

  • Roger Sutton 52 posts 124 karma points
    Nov 21, 2012 @ 10:28
    Roger Sutton
    0

    The URL above had a chunk removed when it was posted, the querystring part is:

    ....aspx?returnurl=%2fmedia%2f46053%2fera_agm_140911.pdf

  • Roger Sutton 52 posts 124 karma points
    Nov 21, 2012 @ 11:56
    Roger Sutton
    0

    Hi Richard,

    I've forced the issue by adding a usercontrol to the login page and adding the following in PageLoad:

        protected void Page_Load(object sender, EventArgs e)
        {
            if (System.Web.HttpContext.Current.User.Identity.IsAuthenticated)
            {
                if (!String.IsNullOrEmpty(Request.QueryString["returnurl"]))
                {
                    Response.Redirect(Request.QueryString["returnurl"].ToString());
                }
            }
        }

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Nov 21, 2012 @ 12:52
    Richard Soeteman
    0

    Hi Roger,

    This is what would work indeed. for 1.1.7 I want to check if I can create it in my own package instead of guessing it will work with the membership provider or let you code it manually but this will be great for existing customers! Thanks!

    Best,

    Richard

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Nov 30, 2012 @ 15:32
    Richard Soeteman
    0

    Hi Roger,

    To solve the returnUrl issue for once and for all. I have implemented custom redirect functionality in the MediaProtect version. In case you want to test it I've add this to the latest hotfix which can be found at http://hotfix.soetemansoftware.nl/MediaProtect/

    Best,

    Richard

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Dec 06, 2012 @ 09:22
    Richard Soeteman
    0

    HI All,

    This returnUrl is fixed in the 1.1.7 Release.

    Best,

    Richard

  • Roger Sutton 52 posts 124 karma points
    Dec 06, 2012 @ 09:55
    Roger Sutton
    0

    Thanks Richard.

Please Sign in or register to post replies

Write your reply to:

Draft