Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can not open network file in windows service

Status
Not open for further replies.

hankgao0703

Programmer
Jul 18, 2001
27
0
0
CA
I am developing a windows service applicaiton in which I open a file which resides in another computer and do further handling. what I am doing now is map that network directory to a local logical driver, then call fopen function to open it, just like it were a local file, but I just can not succeed in opening it, everytime I get "access error"(error number is 5).

by the way, I test the code in an indepedent application, and it works fine.

Can anyone tell me why?
 
It might have something to do with the account that the service is started under. Check that it is starting up under an account that has proper permissions to the share.
 
Thanks,
But I am using same account with the one I use in the indepedent application, I still get this error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top