Hi all.
The problem is as follows:
I have a web service in a web server(ws01) that takes an absolute path from the client. The client is located in a machine inside the network and gives the absolute path to the webservice. The file from the path is always on another server(FS04). And is given using a openfile dialog like so:
reference = new fileProcessorRef.Service1SoapClient();
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.InitialDirectory = "c:\\" ;
openFileDialog1.Filter = "Image files (*.*)|*.*" ;
openFileDialog1.FilterIndex = 2 ;
openFileDialog1.RestoreDirectory = true ;
openFileDialog1.Multiselect=true;
DialogResult result = openFileDialog1.ShowDialog();
foreach (string file in openFileDialog1.FileNames)
{
processorResult = reference.ProcessFile(file);
}
The path(according to the debug )is like this:
"\\\\Fs04\\files$\\file.tif"
File.Exists() on that path in the client it returns true as expected.
The problem is running the same path in the web server returns false.
It is not a network error as both client and wb server have access to the file. I tested using the run command on both like so:
"\\Fs04\\files$\\file.tif"
I don't know what the problem is, I suspected the \\\\ instead of \\ in front of the path. It worked just fine when I was using localhost in my development machine and as soon as I deployed the app to the web server it stopped working.
Any insights would be appreciated.