Scheduled Tasks

Discussion in 'ASP.NET 2.0' started by joelnet, Oct 17, 2006.

  1. if your forms authentication is redirecting to the login page, the scheduled task will not hit the desired page, but be redirected to the login page.

    Your page will need to be publicly accessible. If you need to password protect your page, it must be accessible via basic authentication.

    To test basic authentication you issue the following command...

    TELNET test.com 80

    Then once it connects, paste this in and hit enter twice...

    GET /default.aspx HTTP/1.0
    host: test.com
    authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==


    The basic authentication string is just the base 64 encoding of <user>:<pass>

    There's a tool here that'll create this for you... http://www.allworldsoft.com/software/8-163-authentication.htm
     
  2. Hey Joel,


    Thanks for the advice. Actually, there is no explicit redirect and the directory where the page exists is public so no worries about redirecting to the login page.


    I think ithas to do with the cookieless feature. Basically when ASP.NET autodetects if cookieless is true it restructures the original request url and performs a behind the scenes redirection.


    For example, ifI were to navigate to my fictitional urlat www.somewebpage.com/task.aspxASP.NET would take this request and reformat it to www.somewebpage.com/task.aspx&amp;amp;AspxAutoDetectCookieSupport=1and redirect.


    This is totally out of my hands. Well sort of... hence my interest in subdirectory web.config files per another thread. I'm hoping if I override all the authentication and cookieless settingsthat the code will run via the scheduler.


    Crossing my fingers. Still, if you can think of a better way, I'm all ears.


    Thanks,


    JSash
     
  3. try disabling the session state...




    <%@ Page Language="C#" enablesessionstate="false">


    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  4. Okay, I'm having a problem with Discountasp.net's Schedule Tasks Manager and my ASP.NET 2.0 web application.

    The Scheduled Task Manager does not allow for aspx. pages that redirect. I'm thinking fine, my web page does not redirect. Apparently, my page may not explicitly redirect but ASP.NET does.

    It seems that either due to the cookieless or forms authentication feature ASP.NET will restructure the url and redirect the request behind the scenes. So my page will not work properly via the Scheduled Task Manager.

    Has anyone run into this problemand found a good workaround?

    Any suggestions would be greatly appreciated!

    TIA,
    Jsash
     
  5. Joel,


    I have a website based on forms authentication. I would like to use "Scheduled Task" but would like to password protect the page. You suggest above that you must use Basic Authentication. Could you provide some more detail on how that is done or point me to an article that describes how to do it?


    Ted


    tmr
     
  6. Bruce

    Bruce DiscountASP.NET Staff

Share This Page