Scheduled task to password protected url does not work

Discussion in 'Hosting Services / Control Panel' started by tuomo, Apr 23, 2010.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I have the scheduled task that calls .aspx-page from password protected folder. "Last Result" in Scheduled Task Manager is always "302 - Found" and my task is not executed. When I take off the password protection from the folder where my task is and allow anonymous access, the task is runned normally and HTTP status is "200 - OK".

    Anyone who knows how to call a site from password protected folder? Working example would be nice.
     
  2. mjp

    mjp

    A scheduled task will not work on a password protected file.

    The scheduled task behaves just like visiting the URL with a browser. So it would stop at the point of authentication and not be able to access the file.
     
  3. Okay. But how I then use optional username and password fields in Scheduled Task Manager? Why they are there if I cannot use password protection with scheduled task?
     
  4. mjp

    mjp

    Oh, you caught me there. I was thinking of a redirect, not password protection. My bad.

    It should work if you supplied the proper user/pass...
     
  5. Bruce

    Bruce DiscountASP.NET Staff

    You are probably using Form Authentication which is not supported.

    If you use Windows Authentication on the application, you can password protect the scheduled task page.
     
  6. Thanks for asnswers. I have one more question.
    Should this case work?:
    My task application is not using authentication at all. Task application is in folder, which is password protected, only one user have permissions for this folder. And I have created a new user who has the permission for this folder. Then I put that user's username and password to the scheduled task manager.
     
  7. I tried to enable Windows Authentication using IIS 7 Manager on my local machine. I cannot enable Windows Authentication, because it is missing from authentication pane!
     
  8. Bruce

    Bruce DiscountASP.NET Staff

    You should be able to enable windows authentication in the web.config
     
  9. Scheduled Task on a protected directory

    I'm having the same confusion.:confused:

    If I'm using forms authentication on the rest of my site, how would I use the user name and password in Scheduled Tasks to run the aspx file?

    I've tried setting user permissions on the directory and the directory is secure, but I can link directly to the aspx file without error.

    Thank you for any insight.
     
  10. A single IIS web site / ASP.NET web application supports a single authentication scheme. In other words if your web site is configured for forms authentication, it will not be possible for it to also support windows authentication.

    One solution will be to create a brand new application configured for windows authentication solely for the purpose of housing your protected DASP schedulable web pages; upload this and create a new application in the control panel.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page