Scheduling an asp.net app running on iis/Win2k

Discussion in 'ASP .Net' started by JIK, Nov 5, 2003.

  1. JIK

    JIK Guest

    Hi.

    I want to schedule an asp.net app running on a win2k server/iis.

    The asp.net app is installed and works fine in the browser. It also works
    fine from ab vb script when I run it from the prompt/explorer:

    Kommant from prompt:
    runasp.vbs http://localhost/theapp.aspx

    The script (runasp.vbs):
    Option Explicit

    On Error Resume Next'

    ' Script som kjører kall mot iis server for å kjøre kode fra schedule

    ' Declare our vars

    Dim objWinHttp, strURL

    ' Request URL from 1st Command Line Argument. This is

    ' a nice option so you can use the same file to

    ' schedule any number of differnet scripts just by

    ' changing the command line parameter.

    strURL = WScript.Arguments(0)

    ' Could also hard code if you want:

    'strURL = "http://localhost/ScheduleMe.asp"

    ' For more WinHTTP v5.0 info, including where to get

    ' the component, see our HTTP sample:

    ' http://www.asp101.com/samples/winhttp5.asp

    Set objWinHttp = CreateObject("WinHttp.WinHttpRequest.5")

    objWinHttp.Open "GET", strURL

    objWinHttp.Send

    ' Get the Status and compare it to the expected 200

    ' which is the code for a successful HTTP request:

    ' http://www.asp101.com/resources/httpcodes.asp

    If objWinHttp.Status <> 200 Then

    ' If it's not 200 we throw an error... we'll

    ' check for it and others later.

    Err.Raise 1, "HttpRequester", "Invalid HTTP Response Code"

    End If



    But when I try to start this from the win scheduler it wont run....



    Anybody have any suggestions?





    Jon
     
    JIK, Nov 5, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tony Lewis
    Replies:
    0
    Views:
    569
    Tony Lewis
    Oct 24, 2003
  2. Werner T via DotNetMonster.com

    ASP.NET applications not running on Win2K laptop

    Werner T via DotNetMonster.com, Dec 28, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    473
    Werner T via DotNetMonster.com
    Jan 18, 2005
  3. =?Utf-8?B?YmNveA==?=
    Replies:
    2
    Views:
    2,902
    =?Utf-8?B?YmNveA==?=
    Jan 28, 2005
  4. Rob Roberts
    Replies:
    0
    Views:
    2,460
    Rob Roberts
    Feb 10, 2006
  5. Rob Roberts

    Problem running ASP.NET 2.0 on Win2K domain controller

    Rob Roberts, Feb 10, 2006, in forum: ASP .Net Security
    Replies:
    16
    Views:
    455
    Rob Roberts
    Feb 16, 2006
Loading...

Share This Page