473,395 Members | 1,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Issues with launching Batch files on Win2003 (not Win2000)

hi guys,

here is my problem:
i have to maintain a web vb.net application developped some times ago.
The application was developped on Windows2000 SP3 with Visual Studio
2003 (7.1).
and the application was running on windows 2000 SP3 with the usual IIS.
Right now i need to make it work, on a Windows 2003 SP1 server (but i
need the keep the dev environment on VisualStudio 2003).
this app need to run some batch file, unfortunately for me, on the
initial development instead of rely on the .NET1.1 references classe an
activex was use to run the batch files.
And as I fear this ActiveX doesn't exist on the win2003 OS, so i wrote
a quick launcher for batch file (as you can read below).
I test it under Win2000 OS, and it run fine giving the output of the
batch.
So i deployed the application on Win2003, the same way under
Windows2003.
(well registering .NET 1.1, and allowing it via inetmgr , I also put
trace on,
from web.config file
<identity impersonate="true" />
<authentication mode="Windows" /></authentication>
<authorization>
<allow users="*" / <!-- Allow all users -->
</authorization>
<trace enabled="true" requestLimit="10" pageOutput="false"
traceMode="SortByTime" localOnly="false" />
)

Then i log on the web app using a user registered on the domain, And i
would really love if the batch could launch.
but unfortunately the launcher return nothing from the StandardOutput
from the process.start.
but no error, no exception. I also check in the eventviewer if there
would be some error raised (i was thinking about silent impersonation)
but unfortuntely i can't found anything...
As i wasn't sure about the impersonation I checked the url :
http://support.microsoft.com/kb/306158/en-us , i implemented any
solution but i keep the same behaviour no error, and an empty result.

So if anybody could raise a solution from his hat it will really be
enjoyable.

Thank you so much in advance.
Kind regards,

Steve

ps : well i just can't make any change on the OS configuration (it's
another team which is responsible for this and they won't go this way)
pps : i run the batch by hand with the same user, and it run fine.

from web.config file
<identity impersonate="true" />
<authentication mode="Windows" /></authentication>
<authorization>
<allow users="*" / <!-- Allow all users -->
</authorization>
<trace enabled="true" requestLimit="10" pageOutput="false"
traceMode="SortByTime" localOnly="false" />

here is my launcher :
Function executeLocalBatch(ByVal CommandeComplete As String, ByVal
LesArguments As String, ByVal TimeOutInSeconds As Int32, ByVal laTrace
As TraceContext) As String

Dim resultat As String = ""
Dim myProcess As Process = New Process
Dim sin As StreamWriter
Dim sout As StreamReader
Dim serr As StreamReader

myProcess.StartInfo.FileName = CommandeComplete
myProcess.StartInfo.Arguments = LesArguments
myProcess.StartInfo.UseShellExecute = False
myProcess.StartInfo.CreateNoWindow = True
myProcess.StartInfo.RedirectStandardInput = True
myProcess.StartInfo.RedirectStandardOutput = True
myProcess.StartInfo.RedirectStandardError = True
Try

myProcess.Start()
sin = myProcess.StandardInput
sout = myProcess.StandardOutput
serr = myProcess.StandardError

myProcess.WaitForExit(TimeOutInSeconds * 1000)
resultat = sout.ReadToEnd()
resultat += "Erreur :[" + serr.ReadToEnd() + "]"

Catch ex As Exception
Dim error_msg As String = handleText_Exception(ex, "erreur
dans l'execution ")
laTrace.Warn(error_msg)
resultat += error_msg
End Try
laTrace.Warn("exec seems ok")

If Not myProcess.HasExited Then
myProcess.Kill()
Throw New SystemException("Erreur : l'application " +
CommandeComplete + " ne s'est pas arreté normalement, son execution
s'est probablement mal passée")
End If
laTrace.Warn("exec the result is = [" + resultat + "]")
Return resultat
End Function

Jul 13 '06 #1
0 1708

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: ll | last post by:
Hi, I have some ASP pages(called dlls) running well on Win2000, but not Win2003. Got "Permission deny" when called Server.CreateObject("xx.xx"). Any ideas? Thanks...
5
by: Paul | last post by:
I'm using Microsoft's ASPFileUpload routines and all works fine as long as my files are smaller than about 200K. For anything larger than about 210K, I get the following error: Error Type:...
0
by: Scott Townsend | last post by:
We are trying to get the Microsoft ASPFileUpload to work on both Win2003 and Win2000 http://support.microsoft.com/default.aspx?scid=kb;en-us;q299692 We can now get large and small files on our...
0
by: natasha | last post by:
i develop applications in VisualStudio.net with win2003+iis6 and deploy them to the production server wich has win2000+iis5 on it. are there going to be problems on the production server?
0
by: Randy | last post by:
Hi all, I'm a developer on the database backend and need to figure out how to get a c++ .net executable to run on a win2003 server. The executable transfers data between oracla and sql server...
0
by: hockeyove | last post by:
Hi! Little help needed... This is my environment: Server: Windows 2003 Client: Windows 2000 and Windows XP
1
by: Ryan Malone | last post by:
I have a situation where I need to download multiple files in a vb.net application. To speed up the process, I am trying to download multiple files at one time looping through each of the files...
1
by: Uday | last post by:
hi everyone, I searched in faq's but couldn't find and solution... so here I post the popular question.. Env: Win2003 server / IIS6.0 Simple ASP page that runs a batch file. When I run the...
9
by: sesling | last post by:
We have several batch programs that users need to run each day to move data around our system. The batch files require the user to enter criteria when launching the program. To help simplify this I...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.