Hi,
I've got an FTP client written in C# which works fine when directly
accessing the internet.
However I need to update it so that it can FTP through an ISA proxy
server. I have downloaded a number of samples but can't get any of
them to work with the proxy.
There appears to be two approaches:
1) Tunnel FTP through HTTP
http://groups.google.com/groups?hl=e...TF-8%26hl%3Den
I've tried this and the problem I have is that the ISA server is set
to 'integrated authentication' so I get a 407 error response.
Is there a simple way to generate the proxy-authentication header for
NTLM? The client is written in C# so I have access to the .Net classes
but there doesn't seem to be anything suitable - I've looked at
NetworkCredenti als but have no idea how this would translate to a HTTP
header.
2) Extend WebRequest/WebResponse
I've had a look through the code for the Microsoft sample (KB 166691)
and it seems to be plain wrong. For example:
a) in OpenControlConn ection it tries to get a response after the
socket connection - this hangs indefinitely
b)in GetResponse if a proxy username is defined it processes it into
pr*******@remot e.ftp.site
c) it connects a socket to the proxy server and then tries to send FTP
commands straight to this socket - do they not have to be wrapped up
to prevent the proxy server from trying to parse/execute them?
I'd be grateful if anyone could explain what's going on here - have I
misunderstood how it works? Has anyone used this architecture as the
basis for a working FTP client via a proxy server (which requires
authentication) ?
Finally is there an alternative solution (apart from reconfiguring the
ISA security)?
Thanks in advance,
Phil