J
Jazper Manto
hi
i have a webservice which sould read a file on another PC in our network.
the security on the directory "\\Srv1\Tmp" is Everyone FullControl!
however even the System.IO.File.Exists() returns false although the file
exists.
whats wrong??? how can a webservice read a file on another computer in the
same network.???
thanx for every little hint
jazper
--- CODE Webservice ---
[WebMethod]
public void test_read(string filename)
{
if( System.IO.File.Exists(filename) )
{
System.IO.FileStream fs = System.IO.File.Open(filename,
System.IO.FileMode.Open, System.IO.FileAccess.Read);
if( fs.CanRead )
{
int bty = fs.ReadByte();
}
fs.Close();
}
}
--- CODE Windows Application ---
private void button2_Click(object sender, System.EventArgs e)
{
string filename = @"\\Srv1\Tmp\test.txt";
ws35service.Service1 myservice = new ws35service.Service1();
myservice.Credentials = System.Net.CredentialCache.DefaultCredentials;
myservice.test_read(filename);
}
i have a webservice which sould read a file on another PC in our network.
the security on the directory "\\Srv1\Tmp" is Everyone FullControl!
however even the System.IO.File.Exists() returns false although the file
exists.
whats wrong??? how can a webservice read a file on another computer in the
same network.???
thanx for every little hint
jazper
--- CODE Webservice ---
[WebMethod]
public void test_read(string filename)
{
if( System.IO.File.Exists(filename) )
{
System.IO.FileStream fs = System.IO.File.Open(filename,
System.IO.FileMode.Open, System.IO.FileAccess.Read);
if( fs.CanRead )
{
int bty = fs.ReadByte();
}
fs.Close();
}
}
--- CODE Windows Application ---
private void button2_Click(object sender, System.EventArgs e)
{
string filename = @"\\Srv1\Tmp\test.txt";
ws35service.Service1 myservice = new ws35service.Service1();
myservice.Credentials = System.Net.CredentialCache.DefaultCredentials;
myservice.test_read(filename);
}