Results 1 to 2 of 2

Thread: ASPExec.Execute

  1. #1
    Join Date
    Dec 1969

    Default ASPExec.Execute

    I&#039;m using Server.CreateObject("ASPExec.Execute") VIA ASP to run commands, like nbtstat, in DOS. Seems to work fine until the server gets simultaneous calls. I think it&#039;s an issue of concurrent Processes. Does anyone have any ideas as how to create a new thread for each call?<BR><BR>Set Executor = Server.CreateObject("ASPExec.Execute")<BR> Executor.Application = "tracert.exe"<BR> Executor.Parameters = "-h 1 " & Request.ServerVariables("REMOTE_ADDR")<BR> Result = Executor.ExecuteDosApp<BR>Set Executor = Nothing<BR>

  2. #2
    Join Date
    Dec 1969

    Default If I were guessing...

    ...I&#039;d chalk it up to a bug in ASPExec.<BR><BR>If it were constructed with proper threading, I think this should work.<BR><BR>Each instance of ASPExec.Execute *should* be running in its own thread, already. Assuming it is marked as "Apartment Threaded" (you could check that in the registry). Granted, it then has to invoke an external process (tracert.exe) via each thread, but that should still be okay.<BR><BR>I know a way you can "fix" the problem, but it&#039;s a hack.<BR><BR>Simply put Application.Lock/Unlock around that code and similar blocks.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts