Problem with Windows Authentication

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
Hi all,

I implemented a login via Active Directory with a plugin. For that to work you have to enable Windows Authentication. The problem with that is, that it breaks every scheduled task. The TaskThread tries to call a controller action but fails with 401 (Unauthorised), because it does not authenticate itself against IIS (in my case). Is there any way to solve this?
At the moment I'm using version 4.00 but as there is no update to this part of code in 4.10 it shouldn't matter.

Any help is appreciated!
5 years ago
As I did some further testing it was enough to add DefaultCredentials to the WebClient in TaskThread class

using (var client = new WebClient())
{
    client.UseDefaultCredentials = true;
    client.UploadValues(_scheduleTaskUrl, postData);
}


By doing this anonymous and windows authentication were working and didn't break the scheduled tasks.
Is there any reason why one shouldn't do that?

But I don't want to edit the core code, so this would have to be added to nopcommerce.

Ideas on that?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.