Hi Bill,
Welcome to ASP.NET newsgroup.
Regarding on this executing bat file under asp.net app fail problem, based
on my experience, it seems likely something related to the asp.net's
workerprocess account which is a very restricted account.
As for the the failure on some machine, did it means the bat file even not
get executed or executed and fail in the middle or at certain point? If it
fails at certain point, I'd suggest we try simplify the bat file to get
what operation make the broken.
In addition, have you found any eventlog entry on that machine related to
this problem? Also, for the current workaround you mentioned, I'm also
feeling a bit strange, but I think we may need to perform some general test
first so as to make thing clearer.
Looking forward to your response. Thanks,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Bill Rapoza" <>
| Subject: Weird Diagnostics.Process bug
| Date: Mon, 29 Aug 2005 10:21:03 -0700
| Lines: 25
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| Message-ID: <>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 199.244.171.156
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msft ngp13.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:120967
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| We have a method that executes an arbitrary batch file (we use it for
remote
| upgrades of our system).
|
| When we execute this method from outside of ASP.NET (either in the
| foreground app or from a windows service), the method works fine.
However,
| when we execute it from ASP.NET, the execution fails on some machines.
Now,
| if instead of running the batch file directly, I run cmd.exe and have it
run
| the batch file:
|
| cmd /k platformupgrade.bat
|
| the batch file still does not execute (note: I'm using /k instead of /c
for
| debugging purposes. the behavior is identical).
|
| However, if I run cmd and have it also run cmd and have the second cmd
run
| the batch file:
|
| cmd /k cmd /c platformupgrade.bat
|
| The batch file runs fine.
|
| What's going on here? Frankly, I'm very leery of including this "fix"
into
| my application because it's so strange.
|
|
|