countrymeister
asked on
WCF serive hosted in windows service cannot connect to remote share
I have a WCF servie hosted in a windows service, which tries to read files from a remote network share folder
The wcf service runs fine when run in debug mode, but when the wcf service is run hosted withhin the windows service I get an error
could not find part of the path \\blah\blah\blah
I run the service under my account, which is also true wen I am in debug mode in VS.
Is there something in the config I could specify
The wcf service runs fine when run in debug mode, but when the wcf service is run hosted withhin the windows service I get an error
could not find part of the path \\blah\blah\blah
I run the service under my account, which is also true wen I am in debug mode in VS.
Is there something in the config I could specify
ASKER
ste5an
As I mentioned in my initial request, I am running the service under my account, I have checked that.
In fact I even logged the Environment.UserName when the service is started to make sure it was my account being used.
As I mentioned in my initial request, I am running the service under my account, I have checked that.
In fact I even logged the Environment.UserName when the service is started to make sure it was my account being used.
What's the exact error message?
ASKER
I have it in my initial request
could not find part of the path \\blah\blah\blah
basically i have root directory\subdirectory\sus ubdirector y
could not find part of the path \\blah\blah\blah
basically i have root directory\subdirectory\sus
Aha, I have never seen this message. So i can't help you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yeah, silly me. How could I expect a stack trace or the exact exception message..
ASKER
I had no solution provided by any expert
You need to consider that your Windows service may run under a different account than yours. And this account may not have access to that share.
So, take a look at the account used in the Log On As column (services.msc on the command line):
Local System and Network Service do not have access to shares. Thus create your own servics account and give it the necessary permissions to connect to your share.