Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2006

Tip: Looking for answers? Try searching our database.

Windows service problem with FTPWebRequest

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Frederik Wehlin - 29 Mar 2006 16:49 GMT
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
Cowboy (Gregory A. Beamer) - MVP - 29 Mar 2006 17:44 GMT
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.

Signature

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

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

> 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
[quoted text clipped - 12 lines]
>
> Regards Frederik
Frederik Wehlin - 30 Mar 2006 08:37 GMT
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?

> There are two potential security gotchas here:
>
[quoted text clipped - 22 lines]
> >
> > Regards Frederik

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.