Copied to clipboard

Flag this post as spam?

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


This forum is in read only mode, you can no longer reply
  • Keith Bamberger 26 posts 106 karma points
    Feb 22, 2015 @ 12:50
    Keith Bamberger
    1

    Getting a 403 but dont really understand why?

    Hi James,

    Sat next to you at Codegarden Bingo, hope you enjoyed the surrealism of codegarden bingo :) Maybe see you again this year? ;)

    I am trying to use remote.asdx to get images from a facebook feed (which gives me URLs) and im seeing a 403 in the log files as a response (Otherwise the images just arent showing)

    Im using Umbraco 7.2.1, and have tried Imageprocessor.Web (Installed via nuget) + the imageprocessor.web.config (Installed via nuget).

    If i surf to the images manually i get at the pictures without a problem. I have added the urls in the whitelist (ok the domain part, not teh full url) but no joy.

    I have tested that the actual imageprocessor is working by using some local images (which work great) and some remote images that only worked once the domain was added in the whitelist, so it seems everything is as it should be, but no?

    The only difference is that the images from my facebook feed are att https:// domains (although i tested this with our current website and that worked ok). Here is an example of an image that wont show:

    https://scontent.xx.fbcdn.net/hphotos-xfp1/v/t1.0-9/s130x130/109994317279139006626784997385697296723794_n.png?oh=feebc030a780b2c30465299829689898&oe=5580F58C&width=217&height=104

    my whitelist has in it (I have also tried without https:// which the image also works with.

    I thought maybe that this image already has parameters in the url and that adding &width=200 on the end may be the problem, but again testing this theory it worked when i tried with images that i tested with on my current website (via remote.asdx).

    Any ideas why? is there any extra logging i can turn on for a better trace?

    HEre is some log info

    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.TaskAsyncHelper.EndTask(IAsyncResult ar) at System.Web.HttpApplication.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) 2015-02-21 18:41:06,381 [51] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 57] An unhandled exception occurred System.Net.WebException: The remote server returned an error: (403) Forbidden. at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at ImageProcessor.Web.Helpers.RemoteFile.

    Thanks for any help.

  • James Jackson-South 489 posts 1747 karma points c-trib
    Feb 23, 2015 @ 10:45
    James Jackson-South
    2

    Hi Keith,

    Yeah I remember; excellent times! I hope you are well, hopefully I will be back there again. :)

    Just testing the link in the browser I get an error page. Combined with the 403 it would seem to me that the image is protected behind Facebook security and will reject any attempt to download it without the appropriate credentials. Could you double check whether that is the case? Just try loading it in a browser you're not logged into or something.

    Cheers

    James

  • Keith Bamberger 26 posts 106 karma points
    Feb 23, 2015 @ 11:22
    Keith Bamberger
    100

    But of course james! Ive probably cached a session to facebook and thats why i can manually surf to the picture wihtout any problem. Time to open IE (shudders) to test the theory.. no facebook sessions in there.

    always nice to get a nudge towards the obvious. Staring at the problem too long makes it easy to miss the bleeding obvious.

    /K

  • James Jackson-South 489 posts 1747 karma points c-trib
    Feb 23, 2015 @ 13:48
    James Jackson-South
    1

    :) No worries. Happens to the best of us!

    If it's any consolation I just spent half an hour trying to figure out why a Google maps callback wasn't working. I had an "?" where I needed an "&" in my url.

    James.

    Ps. Remember to mark this as solved if that fixes it. :)

  • Simon steed 376 posts 688 karma points
    Aug 14, 2015 @ 13:27
    Simon steed
    0

    Hi

    Just had the same problem with my profile image:

    https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xpa1/v/t1.0-1/p200x200/11350405101534585939021931156333012295036369n.jpg?oh=6a55f5f388217f4b91025404d777bb57&oe=568149A3&gda=1451291186439d951a64e7a4e5838607cd519b6b68

    I get the 403 when going via imageprocessor but when I view using a browser not logged into fb I still see the image

    Is there a way to pull these through or is something else going on here?

    Si

  • James Jackson-South 489 posts 1747 karma points c-trib
    Aug 15, 2015 @ 01:27
    James Jackson-South
    0

    Hi Simon,

    You've added the facebook url to the security whilist yeah?

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

    Also.... What version are you running?

    Cheers

    James

  • Simon steed 376 posts 688 karma points
    Aug 17, 2015 @ 12:07
    Simon steed
    0

    Yup sure have whitelisted it - versions are:

    ImageProcessor 2.2.5.0 ImageProcessor.Web 4.3.2 Umbraco 7.2.5

    Any suggestions welcomed :-)

    Si

  • James Jackson-South 489 posts 1747 karma points c-trib
    Aug 17, 2015 @ 21:03
    James Jackson-South
    0

    I'll run a test today with my local build against that url to see what is happening and get back to you. I have an inkling what the cause might be but will need to check.

  • Davy Meybos 11 posts 96 karma points
    Dec 10, 2015 @ 16:07
    Davy Meybos
    0

    Hi James,

    did you look into Simon's issue? It seems I'm having the same problem.

    Facebook image is public available - visible when not logged in. Domain is whitelisted but remote.axd gives a 403 Forbidden error.

    Thanks!

  • Simon steed 376 posts 688 karma points
    Dec 10, 2015 @ 16:17
    Simon steed
    0

    Never managed to resolve it - same as you, the image I checked was public but got 403 when using the processor - ended up not using the processor to pull it through and site is running fine.

  • James Jackson-South 489 posts 1747 karma points c-trib
    Dec 10, 2015 @ 21:04
    James Jackson-South
    0

    Gaaaaagh! Bypassing something is not resolving it!

    Download the test solution, link to the image, attach a debugger, provide some useful feedback!

    Btw, every single Facebook image link on this page gives me a 403.

  • Simon steed 376 posts 688 karma points
    Dec 11, 2015 @ 09:07
    Simon steed
    0

    FFs James, get off your high horse - bypassing worked for what I was trying to do at the time, obviously i'm not the only one experiencing it but not using it now so not an issue anymore

  • Davy Meybos 11 posts 96 karma points
    Dec 11, 2015 @ 09:15
    Davy Meybos
    1

    No need to swear like that. :-)

    I managed to find my problem while debugging the test solution: I was requesting the Facebook image without additional imageprocessor resize and crop parameters. In my case there was only 1 question mark sign in the url, so the Facebook parameters where stripped from the webrequest, resulting in a 403.

    After adding a second question mark and addtional parameters in the url, the remote request is working as expected.

  • Simon steed 376 posts 688 karma points
    Dec 11, 2015 @ 09:15
    Simon steed
    0

    :-)

  • James Jackson-South 489 posts 1747 karma points c-trib
    Dec 11, 2015 @ 15:44
    James Jackson-South
    2

    Enjoy your free software

Please Sign in or register to post replies

Write your reply to:

Draft