Hi Charlie,

Thanks for offering the tips of testing from "incognito and private
window". I tried both and both of them did not prompt me for
authentication. So I am able to run the scheduled task even from there
without problem.

Back to IIS, from the Basic Settings I can see the site is using
"Pass-through authentication" - ApplicationPoolIdentity. Basically I got
"Anonymous Authentication" turned on already. I also noticed that there is
an warning (exclamation mark) for Authorization which says "Cannot verify
access to path - [webroot of the site]".


It looks like this is to do with the built-in ApplicationPoolIdentity I'm
using in IIS for anonymous authentication does not have Read access to my
web root. But I'm not sure how that can be configured. Any more thoughts?

Thanks,
Xiaofeng
​

On Tue, Nov 17, 2015 at 4:50 AM, Charlie Arehart <[email protected]
> wrote:

> Xiaofeng, when a sched task won’t work but the URL works in a browser,
> it’s nearly always an issue of the URL being behind a form of
> authentication that CF can’t support (as a scheduled task or CFHTTP call)
> but the browser can.
>
> As for why it could “no problem” from the browser, it’s usually that your
> browser has cached the credentials, so you’re not seeing that they are
> required and requested, and passed in by the browser.
>
> Here’s a simple test you can do: if using Chrome, open a “new incognito
> window” (via the “hamburger” menu in the top right). If in FF, use the same
> to open a “new private window”. In either case, visit the URL, and if there
> is a need of authentication, you will be prompted for it. If you are not,
> let us know. If you ARE prompted, then you need to find out if IIS is
> configured (whether at the folder or site level) to require authentication
> (see the “authentication” feature in the IIS control panel), and if so, and
> it’s only supporting “windows authentication”, then that’ why you can’t
> access the URL as a sched task. CF does not support that.
>
> Let us know what you find.
>
> /charlie
>
>
>
> *From:* [email protected] [mailto:[email protected]] *On
> Behalf Of *Xiaofeng Liu
> *Sent:* Sunday, November 15, 2015 11:40 PM
> *To:* [email protected]
> *Subject:* [cfaussie] CF11 Scheduled Task Not Running - 401 Unauthorized
>
>
>
> Hi folks,
>
>
>
> I'm running out of options. Basically I have a CF site running on Windows
> 2012 R2 & IIS 8.5.
>
>
>
> I have two scheduled tasks sit under a sub directory of the web root
> directory.
>
>
>
> In IIS 8.5 even from the webroot folder I set the IIS authentication to
> 'Anonymous Authentication' Enabled and it is using the option 'Application
> pool identity'.
>
>
>
> Now when I run the scheduled task from the CF Admin, I got status code 401
> - Unauthorized in the CF http.log.
>
>
>
> But, if I directly run the URL of the scheduled task in a browser, it
> works without any problem.
>
>
>
> When I googled, I realized that other people got the same issue but pretty
> much is because of Windows Authentication is turned on and anonymous
> authentication is turned off. But in my case, I got anonymous
> authentication even from the root.
>
>
>
> Also I tried to set 'IUSR' for the anonymous authentication but still got
> the same issue.
>
>
>
> Could anyone kindly shed some light if you had similar experience before?
>
>
>
> --
>
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/cfaussie.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cfaussie.
For more options, visit https://groups.google.com/d/optout.

Reply via email to