[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

unable to call executable from webservice

Posted on 2007-04-03
2
Medium Priority
?
740 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
Niraj_Singh earned 1500 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

649 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