I have a WCF which I can call from a VB.NET application like this:
Dim tcp As New TCPService2.Service1Client
ExStreamPath = "C:\Program Files\Exstream\Dialogue 6.1\Engine.exe"
datPath = "-FILEMAP=DataFile,\\Dev-srv1\Exstream\LetterWriterApp\Input Files\Data Files\SAVEezkazivaftf40s452ndayb45.dat"
optPath = "-CONTROLFILE=C:\Exstream\Development\LetterWriter\ControlFiles\Letter.opt"
tcp.StartExStream(datPath, optPath, ExStreamPath)
The previous code kicks off a subroutine in a WCF (written in VB.NET), which uses the process object to start a 3rd party executable (with the arguments listed above). The code works great.
But, I’m having problems making the same type of call with C#. I think it might have something to do with a VB WCF being passed C# filepaths (the whole double-\\ thing), but I’m not sure. When trying to run the following code, I’m getting a ‘File Not Found’ error. The paths have been copied and pasted, so I know the paths are identical. Here’s the C#:
tcpExstream.Service1Client MyTCP = new tcpExstream.Service1Client();
string ExStreamPath;
string datPath;
string optPath;
ExStreamPath = @"C:\Program Files\Exstream\Dialogue 6.1\Engine.exe";
datPath = @"-FILEMAP=DataFile,\\Dev-srv1\Exstream\LetterWriterApp\Input Files\Data Files\SAVEezkazivaftf40s452ndayb45.dat";
optPath = @"-CONTROLFILE=C:\Exstream\Development\LetterWriter\ControlFiles\Letter.opt";
MyTCP.StartExStream(ExStreamPath, datPath, optPath);
Any ideas?
Thanks in advance,
Jason
Your arguments appear in a different order between the two.
Compare:
With: