Groups | Blog | Home
all groups > dotnet web services > april 2005 >

dotnet web services : Running batch file from webservice



Antonio
4/21/2005 8:36:33 AM
I recently installed on my Windows 2003 Server the Support tools in
order to create DNS using dnscmd.exe.

I created a batch file called File.bat which I wanted to run from a
webservice but it didn't work.

Afterwards, I created a Windows Application to try and run the process
using the following code:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim process As New Process
process.Start("C:\...\..\...\File.bat", "Server domain.com")
End Sub

Resulting a Domain created in the DNS service.

I did the same thing using a webservice and didn't create de domain.

Any ideas on what can be happening?

Thank you.
recoil NO[at]SPAM community.nospam
4/21/2005 1:30:09 PM
Most likely a security issue. You will need to impersonate a user that
has elevated privileges. By default asp.net should not be able to
perform that action. I am surprised that you are not coming to us with
some sort of 500 error or other exception.
Villi Bernaroli
4/22/2005 2:28:39 PM
Mi e' parso che recoil@community.nospam abbia scritto:

[quoted text, click to view]

Not so strange, I have had the same too, using a web service
written in Visual Foxpro 8 and using an ISAPI listener. Batch
processes just don't get executed, without passing any error to
the w-s dll.
--
The answer to the ethernal question is:
put a read events after the launch of the form

AddThis Social Bookmark Button