Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access to remote server via a Web Service

Status
Not open for further replies.

swade61970

Programmer
Apr 2, 2003
19
US
We are in the process of creating a Web Service to run on our IIS Web Server. We want the Web Service to be able to read a file system on another server. I would like to know what our options are.

1) Map Drive
2) UNC naming
3) Virtual Directory

I would rather not use a map drive unless I have to. If you could provide a snippet of code I would be most appreciative.

Thanks,
Scott
 
You should be fine as long as you use the full path (and set up the permissions correctly) e.g.
Code:
\\servername\foldername\filename.ext


--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
I tried that approach first and got the unknown username and password error. My web server is running on my PC and my credentials exists on both the web server and remote server. I know if I try to connect to a server from Windows explorer it uses my credentials to connect. Who's credentials does the Web Service use?
 
It depends who it is set up to run as (which you can change from the "Log On" tab when looking at the properties of the service).

--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
NT Services by default install under the LocalService account. That account has no network access, so you'll need to run your service as a different user that does have network access.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
I need help with what user to use. I entered my local account on the log on tab of the IIS Admin service and I get the following error when trying to click apply.

Service IISAdmin could not be configured to run under account name .\scwade on computer Local Computer. Service IISADMIN runs in a shared process. If computer Local Computer is not a Windows 2000 computer, services which run in a shared process must run under the system account.

Thanks for your help folks.
 
Okay, I'm a little confused. When you stated to run your service as a different user that does have network access. What service were you talking about? The IIS service or the Web Service I am creating?

I tried changing the user for the IIS service with no luck. I'm re-reading your suggestions and it may appear your suggesting the Web Service I'm creating to run under a different user. I'm new to Web Services as you can tell so how do I do that?

 
chiph said:
you'll need to run your service as a different user
The keyword(s) in chip's quote was "your service" i.e. the web service that you are creating (the one that will actually have to access the network files).

ca8msm said:
which you can change from the "Log On" tab when looking at the properties of the service
You can change the account that it runs under like I said in my post above

--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top