Copied to clipboard

Flag this post as spam?

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


  • Sebastian Dammark 583 posts 1407 karma points
    Aug 17, 2016 @ 09:28
    Sebastian Dammark
    0

    Setting imageprocessor up to do external links ?

    Hi,

    I'm on a project running on UaaS, single environment and without a local setup.

    How do I configure ImageProcessor to do external links ? All the examples I find tells me to run NuGet, but that's not an option for me.

    // Sebastian

  • Sebastian Dammark 583 posts 1407 karma points
    Aug 18, 2016 @ 19:16
    Sebastian Dammark
    0

    I've tried to replicate the settings from this page: http://imageprocessor.org/imageprocessor-web/configuration/

    But when I do, the website returns a YSOD telling me to set customErrors to "Off", which it already is.

    What else to do ?

  • James Jackson-South 489 posts 1747 karma points c-trib
    Aug 22, 2016 @ 00:33
    James Jackson-South
    0

    Hi Sebastian,

    Could you share your security config file so I can have a look?

    There's also a demo test website which demonstrates external url setup.

    https://github.com/JimBobSquarePants/ImageProcessor/blob/b94e03fe51cf4ff791c6668209fda4ffb78f5222/tests/ImageProcessor.TestWebsite/config/imageprocessor/security.config

    Cheers

    James

  • Sebastian Dammark 583 posts 1407 karma points
    Aug 22, 2016 @ 07:12
    Sebastian Dammark
    0

    I sure can.

    I've basically copied it from imageprocessor.org, but changed the key named protocol to "https". But I've tried both http and https with no luck

    <security>
      <cors>
        <whitelist>
          <add url="http://imageprocessor.org"/>
        </whitelist>
      </cors>
      <services>
        <service name="LocalFileImageService" type="ImageProcessor.Web.Services.LocalFileImageService, ImageProcessor.Web"/>
        <service prefix="remote.axd" name="RemoteImageService" type="ImageProcessor.Web.Services.RemoteImageService, ImageProcessor.Web">
          <settings>
            <setting key="MaxBytes" value="4194304"/>
            <setting key="Timeout" value="3000"/>
            <setting key="Protocol" value="https"/>
          </settings>
          <whitelist>
            <add url="https://*.staticflickr.com"/>
          </whitelist>
        </service>
      </services>
    </security>
    

    Just without all the comments. http://imageprocessor.org/imageprocessor-web/configuration/#securityconfig

  • James Jackson-South 489 posts 1747 karma points c-trib
    Aug 22, 2016 @ 08:05
    James Jackson-South
    0

    Change

     <add url="https://*.staticflickr.com"/>
    

    To

     <add url="https://staticflickr.com"/>
    

    I check right-to-left so any subdomains are automatically valid.

  • Sebastian Dammark 583 posts 1407 karma points
    Aug 22, 2016 @ 08:45
    Sebastian Dammark
    1

    Ok, now it works.

    Here is the list of wrong doings.

    First of all I've got the YSOD because I had the attribute maxBrowserDays in cache.config, which is supported from version 4.6.0. UaaS is not running that version yet.

    Next I figured out that UaaS is forcing customErrors mode="RemoteOnly", even though you write customErrors mode="Off" in your web.config.

    You can edit the web.config through the Kudu interface, and then the YSOD told me about maxBrowserDays.

  • James Jackson-South 489 posts 1747 karma points c-trib
    Aug 24, 2016 @ 06:00
    James Jackson-South
    0

    Good job! Glad you got it working :)

    Hopefully they'll be up to date soon. v7.5.0 runs v4.6.4

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies