Hi Charlie,

I originally was using a URL like "http://localhost:1981/cron/schedTask.cfm";
to run the scheduled task. So that was the URL I specified in CF Admin.
That threw 401 to me.

Also I tested from the browser by accessing the same URL which is "
http://localhost:1981/cron/schedTask.cfm"; (normal and icognito mode) and it
is working fine.

So now I have to update the URL to use the server's public IP address in CF
Admin and it works. I don't understand why CF running locally on the same
server has to use the external IP, I mean not the localhost to run the
sched task that is also on the same server? Given that localhost is also in
the host file.

Cheers,
Xiaofeng

On Thu, Nov 19, 2015 at 12:01 AM, Charlie Arehart <
charlie_li...@carehart.org> wrote:

> But tell me, Xiaofeng , when I proposed earlier much of the same that
> people have said today, you said in reply the other day that you HAD used
> the EXACT same URL in your browser (run from the server) as in the sched
> task.
>
> So when you refer now to changing the sched task URL to use“not localhost,
> not 127.0.0.1 but the public IP address”, are you saying that IS or IS NOT
> what you tested before when you ran the test in your browser on the server?
> Perhaps you thought this was not significant, but it would be.
>
> It’s the IP address (or domain or machine name) in the URL which
> influences what IIS site handles the request. You may have windows auth on
> in one site, and not the other. And you may have been going to different
> ones all along.
>
> /charlie
>
>
>
> *From:* cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] *On
> Behalf Of *Xiaofeng Liu
> *Sent:* Tuesday, November 17, 2015 11:48 PM
> *To:* cfaussie@googlegroups.com
> *Subject:* Re: Re[2]: [cfaussie] CF11 Scheduled Task Not Running - 401
> Unauthorized
>
>
>
> I figured this out, sort of. Now I changed sched task URL to use the
> public IP address of the server, I got status 200.
>
>
>
> So not localhost, not 127.0.0.1 but the public IP address. I guess this is
> due to the server got multiple NICs so that localhost cannot be resolved
> somehow?
>
>
>
> On Wed, Nov 18, 2015 at 3:39 PM, <dmi...@yakhnov.info> wrote:
>
> Hi Xiaofeng,
>
> This is not CF, it is all about IIS config.
>
> Put a simple .txt file and try to fetch it using CFHTTP, 100% you will end
> up with the same HTTP error 401.
>
> Why? Browser (no matter if it running in generic or private browsing mode)
> is using your credentials (domain or local account) to negotiate access
> with IIS, while CF server is run without these permissions.
>
> Google "http error 401 IIS" and you can find following link with 5 reasons
> IIS refuses to authorize CF:
>
> http://blogs.msdn.com/b/david.wang/archive/2005/07/14/howto-diagnose-iis-401-access-denied.aspx
>
> So, check your IIS logs for sub-401-code to determine cause of your
> problem.
>
> Cheers,
> Dmitry.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "cfaussie" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cfaussie+unsubscr...@googlegroups.com.
> To post to this group, send email to cfaussie@googlegroups.com.
> Visit this group at http://groups.google.com/group/cfaussie.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Best regards,

Xiaofeng,^_^

-- 
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cfaussie+unsubscr...@googlegroups.com.
To post to this group, send email to cfaussie@googlegroups.com.
Visit this group at http://groups.google.com/group/cfaussie.
For more options, visit https://groups.google.com/d/optout.

Reply via email to