Copied to clipboard

Flag this post as spam?

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


  • Ismail Mayat 3995 posts 8181 karma points admin mvp c-trib
    May 27, 2015 @ 13:15
    Ismail Mayat
    0

    remote.axd errors

    James,

    We are seeing a number of remote.axd errors in our elmah logs, basically 2 lots of errors.  One is facebook related so the error is

    String cannot be of zero length.Parameter name: oldValue

    According to elmah the user agent is facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php) when you hit https://www.facebook.com/externalhit_uatext.php this implies facebook sharing and generation in facebook of a preview image?  Again from elmah HTTP_X_ORIGINAL_URL is /remote.axd?http%3A%2F%2Faz725705.vo.msecnd.net%2Fmedia%2F5567%2Fannelot_de_waal_1_mobile.jpg%3Fcrop=0%2C0%2C0%2C0.25&cropmode=percentage&width=300&height=300&rnd=130683471540000000

    When you paste the url passed as parameter it fails becuase its encoded if you run through url decode the image appears, is there decoding issue of passed parameters in imageprocessor?  Btw we are using 2.1.0 i have upgraded to 2.2.5.0 and still get same issue.

    You seen this before?

    Regards

    Ismail

     

  • James Jackson-South 449 posts 1586 karma points c-trib
    May 27, 2015 @ 14:46
    James Jackson-South
    0

    Hi Ismail,

    Did you also upgrade the web component?

    If you are using the latest version of each you should be following the format described here for remote files.

    http://imageprocessor.org/imageprocessor-web/imageprocessingmodule/#remote

    Drop the protocol and use the relative path only. I think it is the encoding of the protocol part of your path that is causing the problem. You normally wouldn't do that.

    Relative parts plus querystring parameters should work fine either encoded or unencoded.

    Let me know how you get on.

    James

  • Ismail Mayat 3995 posts 8181 karma points admin mvp c-trib
    May 27, 2015 @ 15:59
    Ismail Mayat
    0

    James,

    On my local instance i have updated to latest version via nuget which i assume would update all components?  I then tried as per docs removing protocol and replacing ? with / this does not work at all i get errors so i have request like

    http://mysite/remote.axd/stormmanagementstaging.blob.core.windows.net/media/19817/feature-02-b-2480-desktop-xl.jpg?anchor=center&mode=crop&width=2480&height=930&rnd=130743523790000000

    that gives 

    HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  

    Please review the following URL and make sure that it is spelled correctly. 

    If i do 

    http://mysite/remote.axd?http://stormmanagementstaging.blob.core.windows.net/media/19817/feature-02-b-2480-desktop-xl.jpg?anchor=center&mode=crop&width=2480&height=930&rnd=130743523790000000

    that works fine

    doing 

    http://mysite/remote.axd?stormmanagementstaging.blob.core.windows.net/media/19817/feature-02-b-2480-desktop-xl.jpg?anchor=center&mode=crop&width=2480&height=930&rnd=130743523790000000

    so removing protocol gives

    Invalid URI: The format of the URI could not be determined.

    Just to double confirm my umbraco version is 7.2.4

    ImageProcessor.dll 2.2.5.0

    ImageProcessor.Web.dll 4.1.5.0

    You mentioned using relative path only however these images are in azure blog storage.

    Regards

    Ismail

     

  • James Jackson-South 449 posts 1586 karma points c-trib
    May 27, 2015 @ 18:59
    James Jackson-South
    0

    That's odd. I've just tested the first url on my machine and it works perfectly.

    Also, sorry.. I didn't mean relative, I just meant without the protocol.

  • Ismail Mayat 3995 posts 8181 karma points admin mvp c-trib
    May 28, 2015 @ 12:20
    Ismail Mayat
    0

    James,

    Still no joy with this.  After upgrade should it have updated my web.config am i missing something do i need to do something in IIS? My url looks like

    http://mysite/remote.axd/stormmanagementstaging.blob.core.windows.net/media/19817/feature-02-b-2480-desktop-xl.jpg?anchor=center&mode=crop&width=2480&height=930&rnd=130743523790000000

    The image definately exists it looks like its trying to resolve the whole url as opposed to going through to remote.axd and letting imageprocessor do its magic.

    Regards

    Ismail 

  • Ismail Mayat 3995 posts 8181 karma points admin mvp c-trib
    May 28, 2015 @ 12:50
    Ismail Mayat
    0

    James,

    Ok I was using 4.1.5.0 and in your docs the new syntax is for 4.2 upwards.  I upgraded via nuget to 4.3.2 now i get no errors but no image chrome inspector reports 404s old syntax still works.

    Regards

    Ismail

  • Ismail Mayat 3995 posts 8181 karma points admin mvp c-trib
    May 28, 2015 @ 12:56
    Ismail Mayat
    0
  • Ismail Mayat 3995 posts 8181 karma points admin mvp c-trib
    May 28, 2015 @ 13:12
    Ismail Mayat
    100

    James,

    Woot fixed. So after i did nuget it removed modules bits from web.config i re added and now it works with new syntax.  Will get this live and see if this brings down elmah errors.

    Many thanks for you help, owe you big high five when i see you at cg15 ;-}

    Ismail

  • Derrik 29 posts 98 karma points
    Jun 19, 2015 @ 20:04
    Derrik
    0

    Ismail,

    I'm having the exact same issue. I checked the web.config and I am missing some pieces as well. What did you need to add to the web.config to get this all working? Thanks!

  • Ismail Mayat 3995 posts 8181 karma points admin mvp c-trib
    Jun 22, 2015 @ 09:11
    Ismail Mayat
    3

    Derrik,

    Make sure your web.config has in configSections

        <sectionGroup name="imageProcessor">
      <section name="security" requirePermission="false" type="ImageProcessor.Web.Configuration.ImageSecuritySection, ImageProcessor.Web" />
      <section name="processing" requirePermission="false" type="ImageProcessor.Web.Configuration.ImageProcessingSection, ImageProcessor.Web" />
      <section name="cache" requirePermission="false" type="ImageProcessor.Web.Configuration.ImageCacheSection, ImageProcessor.Web" />
    </sectionGroup>
    

    In httpmodules

    <add name="ImageProcessorModule" type="ImageProcessor.Web.HttpModules.ImageProcessingModule, ImageProcessor.Web" />
    

    In modules

     <add name="ImageProcessorModule" type="ImageProcessor.Web.HttpModules.ImageProcessingModule, ImageProcessor.Web" />
    

    and

      <imageProcessor>
    <security configSource="config\imageprocessor\security.config" />
    <cache configSource="config\imageprocessor\cache.config" />
    <processing configSource="config\imageprocessor\processing.config" />
    

    From what I remember after nuget upgrade i had lost modules bit in my web.config

    Regards

    Ismial

  • Derrik 29 posts 98 karma points
    Jun 22, 2015 @ 14:47
    Derrik
    0

    Ismail,

    I updated ImageProcessor, ImageProcessor.Web and ImageProcessor.Web.Config through package manager and had to do a little bit of cleanup in the web.config, but I finally got it all working. Thanks for pointing me in the right direction.

  • James Jackson-South 449 posts 1586 karma points c-trib
    Jun 22, 2015 @ 19:29
    James Jackson-South
    0

    Good man Ismail!

    Yeah, Nuget has traditionally had a little trouble with configuration updates. It's always best to compare with the configuration specified in the documentation.

    http://imageprocessor.org/imageprocessor-web/configuration/

    Glad you got it sorted Derrik.

  • Tom Madden 193 posts 213 karma points
    5 days ago
    Tom Madden
    0

    I found remote images not working after installing PostProcessor. Nuget moved my whitelisted Url from RemoteImageService to LocalFileImageService in security.config.

    I could have fixed this a lot quicker if it has resulted in an unauthorised error instead of 404.

    I hope this saves time for anyone else who encounters this issue. t

Please Sign in or register to post replies

Write your reply to:

Draft