Solved

WCF serive hosted in windows service cannot connect to remote share

Posted on 2014-09-10
8
292 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 32

Expert Comment

by:Stefan Hoffmann
Comment Utility
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
Comment Utility
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 32

Expert Comment

by:Stefan Hoffmann
Comment Utility
What's the exact error message?
0
 
LVL 1

Author Comment

by:countrymeister
Comment Utility
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 32

Expert Comment

by:Stefan Hoffmann
Comment Utility
Aha, I have never seen this message. So i can't help you.
0
 
LVL 1

Accepted Solution

by:
countrymeister earned 0 total points
Comment Utility
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 32

Expert Comment

by:Stefan Hoffmann
Comment Utility
Yeah, silly me. How could I expect a stack trace or the exact exception message..
0
 
LVL 1

Author Closing Comment

by:countrymeister
Comment Utility
I had no solution provided by any expert
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
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 …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now