You Big Dummy wrote:
> I have a web application that will upload files to ftp. I can succesfully do
> this if I specify the credentials using the ftpwebrequest.credentials
> property. But the problem is that we won't to be able to have our code use
> the identity of the application pool to access the ftp but can't seem to
> figure out how as the credentials property only accepts the
> networkcredentials class.
That's because FTP doesn't support integrated authentication, so you can't
use a Windows identity to authenticate. FTP uses only plaintext passwords
and you don't have access to the password of a Windows identity.
If the FTP server is in your domain, it would be a better idea not to use
FTP at all and copy files directly over the network. A robust way of doing
this is provided by the Robocopy utility.
If the FTP server is not in your domain, you should not have a Windows
account whose credentials match that of one on the FTP server. A cracker
could use a successful attack on the FTP server to compromise your domain.
Store the FTP credentials somewhere safe instead -- the web.config with
encryption is probably sufficient.
--
J.
|