?
Solved

unable to call executable from webservice

Posted on 2007-04-03
2
Medium Priority
?
739 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

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