Solved

WCF serive hosted in windows service cannot connect to remote share

Posted on 2014-09-10
8
301 Views
Last Modified: 2014-10-06
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
0
Comment
Question by:countrymeister
  • 4
  • 4
8 Comments
 
LVL 33

Expert Comment

by:ste5an
ID: 40316408
The most common reason: Permissions.

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): Services
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.
0
 
LVL 1

Author Comment

by:countrymeister
ID: 40317386
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.
0
 
LVL 33

Expert Comment

by:ste5an
ID: 40317435
What's the exact error message?
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 1

Author Comment

by:countrymeister
ID: 40319573
I have it in my initial request

could not find part of the path \\blah\blah\blah
 basically i have root directory\subdirectory\susubdirectory
0
 
LVL 33

Expert Comment

by:ste5an
ID: 40319597
Aha, I have never seen this message. So i can't help you.
0
 
LVL 1

Accepted Solution

by:
countrymeister earned 0 total points
ID: 40323521
Hi ! Ste5an
Thank you for trying to help me.
Please make an attempt to read the question fully, instead of asking what is already in the initial request.
Would save us all a lot of time.
0
 
LVL 33

Expert Comment

by:ste5an
ID: 40324971
Yeah, silly me. How could I expect a stack trace or the exact exception message..
0
 
LVL 1

Author Closing Comment

by:countrymeister
ID: 40363284
I had no solution provided by any expert
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

775 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question