Ask a Question related to ASP.NET Web Services, Design and Development.
-
ryan.mclean@gmail.com #1
run .exe from web service - looking for ideas
Hello everyone, I am trying to accomplish something, and the way I had
intended is not working out, so I am looking for ideas.
Here is what I am trying to accomplish. I must preface this by saying
that I am new to iis and iis security.
I have a .exe that must stay on the server. I would like people to be
able to run this .exe with specified parameters/switches without
interacting directly with the server.
I had thought to use a web service to accomplish this, but I am running
into permission problems. Here is my web service; if it helps to
explain (I have tried both versions):
<WebMethod(MessageName:="Unsigned")> _
Public Overloads Function Encrypt(ByVal a_strEncryptKey As String,
_
ByVal a_strDestPath As String, _
ByVal a_strFilePath As String) As String
Dim strReturn As String
Dim objProcess As Process
Dim objProcessInfo As ProcessStartInfo
Try
objProcess = New Process()
objProcessInfo = New ProcessStartInfo("pgp", "-ea """ +
a_strFilePath + """ """ + a_strEncryptKey + """ -z secretkey")
objProcess.StartInfo = objProcessInfo
objProcess.EnableRaisingEvents = True
objProcess.Start()
objProcess.WaitForExit()
Catch ex As Exception
strReturn = ex.ToString
End Try
Return strReturn
End Function
AND
<WebMethod(MessageName:="Unsigned")> _
Public Overloads Function Encrypt(ByVal a_strEncryptKey As String,
_
ByVal a_strDestPath As String, _
ByVal a_strFilePath As String) As String
Dim strReturn As String
Dim objProcess As Process
Dim objProcessInfo As ProcessStartInfo
Try
objProcess = New Process()
objProcessInfo = New ProcessStartInfo("cmd.exe")
objProcessInfo.RedirectStandardInput = True
objProcessInfo.RedirectStandardOutput = True
objProcessInfo.UseShellExecute = False
objProcess = Process.Start(objProcessInfo)
objProcess.StandardInput.WriteLine("pgp -ea """ +
a_strFilePath + """ """ + a_strEncryptKey + """ -z secretkey")
objProcess.StandardInput.WriteLine("exit")
strReturn = objProcess.StandardOutput.ReadToEnd
Catch ex As Exception
strReturn = ex.ToString
End Try
Return strReturn
End Function
It works if I try these in a windows application, that's why I
believe the problem to be permissions related. I have tried mucking
with the security on the pgp.exe file, the .net framework configuration
thingy, and I'm sure other permissions settings. Not really knowing
what I'm doing makes it a frustrating 'shotgun approach' (hoping
something will work).
So now, I am looking for any suggestions on how to make the web service
work or a better way to accomplish this. I hope this makes sense; my
head is a little sore from banging it against the keyboard :)
Thank you for any help.
Have a great night!
Ryan
ryan.mclean@gmail.com Guest
-
PLEASE help with ideas
Okay the situation is as follows... I would like to create a web site, almost like a site for friends to make accounts and gather and so forth. I... -
web service error from flex ProxyServlet - any ideas?
We are getting an intermittent error when calling web services via flex. Our server is IBM websphere. It appears that a request with no data is... -
X ideas
Hello Looking to run X windows on a debian 3.0 for a older machine with a 4 meg video. Its for a server so i want a smallest x server to take up... -
Any ideas on this?
How would i go about creating this? I have a table, within each cell there is an image spacer set to 20 x 20 px the same dimensions of the... -
Any ideas
IDS 9.21 FC4 on HP-UX. Application: Lawson I've never seen this before. The application is inserting some rows into table dsinvlines, according... -
pri #2
Re: run .exe from web service - looking for ideas
I am having the same problem. My call to exe runs perfectly from a
windows app but not from the webservice. Though my tester exe did run
from web service too. Did you find a solution to this problem. If so
please let me know.
The following was my post on microsoft.public.dotnet.framework
[url]http://groups-beta.google.com/group/microsoft.public.dotnet.framework/browse_frm/thread/ce9ee898c6dfb6a1/137782204bd85cf5#137782204bd85cf5[/url]
Thanks.
pri Guest



Reply With Quote

