473,499 Members | 1,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# FTP Client Access Through ISA Server

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
NetworkCredentials 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 OpenControlConnection 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*******@remote.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
Nov 15 '05 #1
5 5050
Hello

Does your FTP client support PASV mode? If it does try it.

Best regards,
Sherif

"Phil Ruelle" <pr*****@lineone.net> wrote in message
news:fc**************************@posting.google.c om...
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
NetworkCredentials 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 OpenControlConnection 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*******@remote.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

Nov 15 '05 #2
I've only ever used passive mode, in fact it doesn't even support active.

"Sherif ElMetainy" <el*************@wayout.net.NOSPAM> wrote in message news:<eI**************@TK2MSFTNGP11.phx.gbl>...
Hello

Does your FTP client support PASV mode? If it does try it.

Best regards,
Sherif

Nov 15 '05 #3
I think if you use the WinInet funcs to do the HTTP/1.1 CONNECT, then that
might handle the different auth method.

--
Louis Solomon
www.steelbytes.com
"Phil Ruelle" <pr*****@lineone.net> wrote in message
news:fc**************************@posting.google.c om...
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
NetworkCredentials 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 OpenControlConnection 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*******@remote.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

Nov 15 '05 #4
pr*****@lineone.net (Phil Ruelle) wrote in
news:fc**************************@posting.google.c om:
I've only ever used passive mode, in fact it doesn't even support
active.


What kind of component does not support Active?
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
Nov 15 '05 #5
pr*****@lineone.net (Phil Ruelle) wrote in
news:fc**************************@posting.google.c om:
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
Yes, but NTLM is not trivial. Indy has FTP and NTLM support
(www.indyproject.org) but I dont remember if the NTLM parts were ported to
..net yet or not.
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?


This is HTTP proxy open port. But you will still need to auth against ISA for
it to let you out.

--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
Nov 15 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5396
by: Krist | last post by:
Hi All, Our customer has just decided to choose as development standard. The application is HR application with report. While many like Web client, Java application/thick client is still...
2
2379
by: Microsoft | last post by:
I'm about to start converting my application from a old-style monolith exe (with flat files and limited database support for sharing some of the data) to a layered .NET SQL server version. I have...
7
3280
by: rdh | last post by:
Hi all, I am in process of developing a Server in C++ supporting multiple protocols. The server will be exposing various functionalities, and the clients can communicate over any of the...
3
1545
by: Jo Davis | last post by:
www.shanje.com does sql server hosting, on shared servers, at a reasonable price. It seems. They also allow client connections. Just playing around I've managed to connect an Access Data Project...
18
7335
by: cjl | last post by:
Hey all: I know that it is silly in the age of Google to 'lose' something on the internet, but I recently checked out a project that had implemented a database with a subset of SQL in pure...
67
2971
by: Mike MacSween | last post by:
I've got a SQL Server database. Nearly finished. It's going to go on a single non networked machine. One day somebody might get access to it over ADSL (probably TS), but for now it's a single user...
3
2645
by: Marc Gravell | last post by:
Kind of an open question on best-practice for smart-client design. I'd really appreciate anyones views (preferably with reasoning, but I'll take what I get...). Or if anybody has any useful links...
9
2396
by: CGW | last post by:
I asked the question yesterday, but know better how to ask it, today: I'm trying to use the File.Copy method to copy a file from a client to server (.Net web app under IIS ). It looks to me that...
5
2897
by: B1ackwater | last post by:
We've fooled around with Access a bit, but only using the single-user store-bought version. It seems to be a good database - versatile and infinitely programmable - and can apparently be used as a...
22
6222
by: Jordan S. | last post by:
SQL Server will be used as the back-end database to a non trivial client application. In question is the choice of client application: I need to be able to speak intelligently about when one...
0
7132
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7009
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6899
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5475
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3103
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
302
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.