D
DC
Hi,
when I open / create a filestream like this:
FileStream(@"\\machinename\dir\file.dat",
FileMode.OpenOrCreate,
FileAccess.Write,
FileShare.ReadWrite
)
I receive UnauthorizedAccessException when "machinename" is not my
local machine, even thought everybody is allowed to do everything in
the share "\dir". I confirmed this by creating and using files in the
share on the machine the application is running on. The application is
a windows service just in case that matters.
I have read similar posts but they were all about asp.net or web
services and the problem was that these were running with different
credentials and therefore could not access the file.
Does anybody have a clue about what is causing this exception? TIA for
any comments.
Best regards
DC
when I open / create a filestream like this:
FileStream(@"\\machinename\dir\file.dat",
FileMode.OpenOrCreate,
FileAccess.Write,
FileShare.ReadWrite
)
I receive UnauthorizedAccessException when "machinename" is not my
local machine, even thought everybody is allowed to do everything in
the share "\dir". I confirmed this by creating and using files in the
share on the machine the application is running on. The application is
a windows service just in case that matters.
I have read similar posts but they were all about asp.net or web
services and the problem was that these were running with different
credentials and therefore could not access the file.
Does anybody have a clue about what is causing this exception? TIA for
any comments.
Best regards
DC