Windows service problem with FTPWebRequest

G

Guest

I've created an application that upload files to a ftp-server. Everything
works like a charm when doing this from a windows form. But when I try the
exact same thing from a Windows service I get an exception when calling the
GetRequestStream on the FTPWebRequest object i.e when trying to open the
stream to the ftp.

the errormessage i get is: The remote server returned an error: (550) File
unavailable (e.g., file not found, no access).

I assume this has something to do with securtiy and access. I've tried to
install the service under a admin user account as well as local system, but
neither work.

Can anyone lead me in the right direction to solve this issue?

Regards Frederik
 
G

Guest

There are two potential security gotchas here:

1. The account for windows forms has access to the FTP server and the
service does not (use a domain account to run the service ... that has the
same types of rights to the FTP server as yours is the solution).

2. Access security on the box. IE, the service is not given rights to use
the services necessary to do what you desire. This is less likely, as you
have set it up under local admin.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
G

Guest

Thanx for your reply.

1. My local network is a workgroup and not a domain, and I've already tried
to installed the service with the same user account as when running the
windows form application.

2. How can change the rights for the service based on 2:nd gotcha?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top