Last post Feb 05, 2009 10:42 AM by TATWORTH
Jul 26, 2005 07:02 AM|pikkim|LINK
Hope if anyone of you can help to solve my problem :(
Recently had developed an application in Web Form using ASP.Net.
This application will actually send out a document in encrypted and signed (encrypt and signed by SecurSign) format to customer.
In order to encrypt and sign the document, we need to execute the SecurSign application in DOS command (SecurSign only can run in DOS command). So, I have a function to prepare all the DOS command in a .bat file.
I am using:
System.Diagnostics.Process.Start(sRootPath & "bat\" & sBatFile)
to start/execute the .bat file
This .bat file is working fine in Window 2000. But unfortunately, we had upgraded our OS to
Win2k3. This web application was failed. No matter what kind of method i used also cannot start/execute the .bat file. But if I convert this source code into VB.Net. and run this application in Task Scheduler then is working fine. Is anyone
of you got any idea what's wrong?
Jul 26, 2005 09:06 AM|LuKiller|LINK
Jul 26, 2005 11:49 PM|pikkim|LINK
I had assigned everyone to have Full Control from the Root Directory until each files in the folder. But still not workable :(
I am not sure whether is IIS6.0 security issue or win2k3 issue. Is anyone of you have any idea?
Sep 27, 2005 12:26 AM|klevereblog|LINK
Nov 03, 2005 03:06 PM|jldengra|LINK
I have the same problem: I am running a web application in which I need to create a process to execute an external application. I have granted all the permisions to the ASPNET user, there is a thread running in system processes, but there is no window opened
(when it should be opened) and no action is performed by this thread (I have tried even calling a .bat file in vane).
If you know how to solve this matter, please tell me.
Nov 05, 2005 07:38 PM|drd0t|LINK
The last thing you have to do is a permission - cmd.exe normally resides in %systemroot%\system32 There is no way that the permissions on this allow execution by the IIS process. On development the user running cmd.exe is ASPNET - add this
to cmd.exe with execute. On production it is the account defined in the application pool, add that to cmd.exe with execute. I just cheated and added 'everyone' with execute to cmd.exe - after all this is an Intranet site not an external facing one so I
can be a little slap-hazard with the file permissions.
Oh - one last thing, you can't get a window to display, it always runs hidden, which makes sense as the process is running as a user who does not have access to the current console window. I guess if you logged in as ASPNET you might get a window to pop up
- never tried it though.
Good Luck - I hope this helps you with your batch files from IIS
Jan 29, 2009 06:26 PM|dyemane|LINK
Has anyone been able to resolve this?
Feb 05, 2009 10:42 AM|TATWORTH|LINK
First a very general point, please:
Rather than grant additonal rights to the Web Site process, why not write a Windows Service to run the transformation. The sequence would be: