Solved

unable to call executable from webservice

Posted on 2007-04-03
2
730 Views
Last Modified: 2008-02-01
This has me and my team really stumped, and so we could use some help. We want to call an external program from a webservice, but it doesn't seem to find the apps, saying file not found. I've followed the examples in VSNET.2003. The program is C#.net. Here's the snippet:

                        System.Diagnostics.Process proc;
                        Process p = new Process();
                        p.StartInfo.WorkingDirectory =
                        "C:\\Program Files\\Microsoft Visual FoxPro 8";
                        p.StartInfo.FileName = "vfp8.exe";
                        p.StartInfo.Arguments = "c:\\dbflock\\rlock.prg";
                        p.StartInfo.UseShellExecute = false;
                        p.StartInfo.RedirectStandardOutput = true;
                        p.Start();
                        p.WaitForExit();


I calls a foxpro executable in the c:\dbflock subdiretory.  I've tried moving the exe to different places (haven't tried system32), added that directory to the path statement, tried this idea:
System.Diagnostics.Process proc;
                        proc = System.Diagnostics.Process.Start(@"c:\DBFLOCK\RLOCK.EXE", arg1);
                        proc.WaitForExit();


Can you think of another way to start an external executable from a web service? Thanks for any help!
0
Comment
Question by:andremara
2 Comments
 
LVL 6

Accepted Solution

by:
Niraj_Singh earned 500 total points
ID: 18848715
hi,
 the file is opened by the aspnet user. this aspnet user does not have sufficient rights to open all file. you may have to give it the required rights.
also refer to the below mentioned link
http://www.code-magazine.com/article.aspx?quickid=0703062&page=2
0
 

Author Comment

by:andremara
ID: 18848758
Hi Niraj,
I think the article is calling .net from fox, where I am starting off in a webservice and would like to call an executable - in this case - foxpro, but possibly other exe's as well. when i run this, "File Not Found" is the error.  Are you saying this could be a rights issue and not a 'file not found' issue?
Thanks
Andre
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question