Scheduled Tasks using Form Authentication?

Discussion in 'ASP.NET / ASP.NET Core' started by marcusT, Feb 7, 2013.

  1. I need to run a scheduled task as an authorized user in order to use protected connection strings, etc. My application uses Forms authentication. Is there a way to run a scheduled task as an authorized user? My understanding from the forums is that user/password credentials in the Scheduled Task Manager only works for Windows Authentication. I can't switch to Windows Authentication: this is an internet application!

    Would my only other option be just pinging the scheduled task page from a "robo-client" on a regular basis? That seems like a poor practice.

    Thanks for any suggestions.
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    unfortunately this is not supported because form authentication uses redirection.

    I usually recommend clients to create a child application that only contain the scheduled logic.
     
  3. Thanks for your reply Bruce.

    Could you elaborate a little more on what a "child application" is, and what I need to do to create one?

    Thanks.
     
  4. martino

    martino DiscountASP.NET Staff

    A Child Application I'm assuming bruce means a another web application in a subdirectory off the root of the hosting account.

    For example the root directory of your hosting account is the Parent. Another web applications in a subdirectory will be consider a "child application".

    You can mark a subdirectory as a application using our Web Application Tool in the control panel. Please read our knowledge base article on how to use our web application tool in the control panel here: http://support.discountasp.net/KB/a160/what-is-the-web-application-tool-and-how-do-i-use-it.aspx
     

Share This Page