Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

WCF serive hosted in windows service cannot connect to remote share

Posted on 2014-09-10
8
307 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
How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 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