Retrieval of login credentials on scheduled task

Discussion in 'Control Panel API' started by raymondp, Nov 4, 2008.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Matthew, I'm afraid what you're trying to do with the Scheduled Task Manager will be impossible. This is because the Scheduled Task Manager can't follow a http redirect which is essentially what it will be doing when it tries to process an application through forms authentication.

    rcp
    DiscountASP.NET
    www.DiscountASP.NET
     
  2. Thanks for the reply; but what if I don't follow the standard forms authentication process of redirects, etc? I know it's not ideal; but what if I make the page itself open to anyone (i.e. no login required to invoke page_load). If I can somehow programmatically retrieve the username and password that is sent via the scheduled task, I can roll my own very simple and cheezy security that literally just checks the username and password against a specific string in the web.config file or even hard-coded (yuck). That way, if anybody calls this particular page without the right username and password, the page will still load; but won't do anything. All of the actual code will be contained within an If (credentialsmatch) block.

    Rememeber, I'm using this page more like a web service that makes some updates to my database. The page has no user interface at all and should never be called up by anything other than the scheduled task manager. Also, once called, I don't need to worry about the user having an authentication cookie to travel from one page to another. The task manager will be pulling up this page and only this page.

    Please advise if there is a way to simply pull out the passed inusername and password as strings in my code behind.

    In case it helps, the code in this page is being used as a work around for the fact that discountasp.net does not allow any sql server scheduled tasks and doesn't allow the installation of any services on the web server. I receive daily flat file updates of data and need to import them into my database. The code in this page is a script that first ftp's the new daily file to the web server and then opens the file and loops through the records in the file to make the appropriate updates, deletes,and inserts into my database so that I have current data.

    Thanks.
     
  3. I have an application that is using forms authentication. I want to run a scheduled task via discountasp.net's control panel scheduler. I'd like to have this "page" require login and pass-in the username and password that is entered in the control panel.

    Is there a way via c# code that I can retrieve the username and password that is input there to verify it with a homegrown simple security mechanism that will not require me to switch my entire application to windows authentication?
     
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