Hi,
I am using File.Exists(path) method to determine if a file exists. Locally it works perfectly, but when I deploy it (project-Copy) on the webserver, it doesn't.
given that both IIS have the same permissions, when I run the program lcally (debug mode) the method returns true, when I run it off the server it returns false.
I have also tried different tests:
path local webserver
-----------------------------------------------------------
\\<dfs servername>\<filename> true false
c:\temp\<filename> true true
o:\temp\<filename> true false
(where o: maps a folder in another server <> webserver)
After alot of research I decided to follow what Microsoft suggests:
But this didn't change a thing.... any ideas?
Daren J. Lahey
Just another computer guy...
FAQ183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
Support your forums TODAY!
I am using File.Exists(path) method to determine if a file exists. Locally it works perfectly, but when I deploy it (project-Copy) on the webserver, it doesn't.
Code:
string strPath = @"\\<DFS Folder>\<Filename>";
if(File.Exists(strPath))
{
// YUPPPIEEEE!
}
else
{
// NOT A CHANCE!
}
given that both IIS have the same permissions, when I run the program lcally (debug mode) the method returns true, when I run it off the server it returns false.
I have also tried different tests:
path local webserver
-----------------------------------------------------------
\\<dfs servername>\<filename> true false
c:\temp\<filename> true true
o:\temp\<filename> true false
(where o: maps a folder in another server <> webserver)
After alot of research I decided to follow what Microsoft suggests:
Code:
FileIOPermission f2 = new FileIOPermission(FileIOPermissionAccess.Read, <path>);
But this didn't change a thing.... any ideas?
Daren J. Lahey
Just another computer guy...
FAQ183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
Support your forums TODAY!