3

I have a C#/.Net app that is essentially a thick client data collection app. Given a part number, it does some DB queries (to an external Orcale DB), some Sharepoint queries, and also searches some network drives for related info. Now I'm trying to change this to a service-oriented architecture. The web service now resides on a server, and when called by a thin client, does the db queries, sharepoint queries, and file system queries and returns the results. All of this works well except file searches. The searches come up empty, I think because the web service is executing within its own little virtual file system, and cannot look out onto the network drives to scan the files it needs to scan.

Can someone recommend the correct way to allow protected read access to the network drives so the service can fetch the info it needs? I'm not looking to serve up these file directly to the thin client, just allow the service to have back-end access to the full array of network drives in our office. By the way the web service is hosted on IIS 6, Windows Server 2003.

1
  • Yes, active directory is in use Jan 25, 2012 at 18:58

1 Answer 1

2

Depending on the user the web service is being run as (I can't remember what the default for IIS6 is but suspect it's essentially "NETWORK SERVICE"), it won't be able to read network shares if they're secured. Your best bet is to create a domain account for the web service to run under and use "Internet Information Services (IIS) Manager" to configure the application pool to run as said user (NOTE: For IIS 6 youy'll also need to add the user to the LOCAL user group "IIS_WPG").

One small note, you mention "network drives" throughout your question; your service will not share any of your mapped network drives, so you'll need to provide it with full UNC paths (i.e. \\server\share rather than m:\) for it to work.

2
  • Thank you, this basically answered my question. I knew about the drive mapping issue, so I have not been using drive letters. Setting the App Pool identity seems to work, but I would prefer that the client's credentials get passed through, so users can read only the items they are allowed, not a blanked account for all. Feb 17, 2012 at 2:01
  • @RandyGamage, glad it helped =) The pass-thru credentials bit is a whole different kettle of fish that is overall fairly easy to solve. There's probably a question or two here (and/or on serverfault) that'll cover it for you.
    – Rob
    Feb 17, 2012 at 6:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.