Problem with job running via the Task Scheduler

Discussion in 'ASP.NET 2.0' started by myrsius0000, Aug 22, 2008.

  1. I am trying to run an ASP.Net 2.0 program in batch mode via submission by the Task Scheduler. The program works fine when manually submitted online via the browser. It does not run properly when the Task Scheduler submits the job. I submitted a support ticket to DiscountASP and they first stated it must be a Redirect in my code but there is no explicit Redirect coded in the program. They next said it might be due to my program performing Forms authentication behind the scenes or a validation being performed to see if cookies are enabled.

    I'm curious if anyone else has experienced this problem and how they resolved it.
    Thanks, David Hynes
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    what is the page you are calling? I can check to make sure it doesn't redirect.


    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. I unable to determine how to prevent the program from redirecting. I have consulted my ASP.Net 2.0 books and have read about authorization and authentication. It appears that inclusion of these parameters are requiring an implicit redirect. So I don't if that means I need to bypass authorization and authentication somehow, or whether it is even possible to bypass them. So I'm at a deadend right now in terms of solutions.

    I have run a similar batch program at a different hosting company with only the following for authorization in the web.config file andthe job runs successfullywhen submitted:

    <authorization>
    <allow users="?" />
    </authorization>

    However, using this at discountasp.net results in the job not running. So I'd appreciate any help.

    Thanks,
    David
     
  4. Bruce

    Bruce DiscountASP.NET Staff

    david,


    as long as you are using form authentication, asp.net will automatically redirect for you.


    I recommend putting your batch code in a seperate application without form authentication.


    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     

Share This Page