473,624 Members | 2,217 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
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
Nov 15 '05 #1
5 5064
Hello

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

Best regards,
Sherif

"Phil Ruelle" <pr*****@lineon e.net> wrote in message
news:fc******** *************** ***@posting.goo gle.com...
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

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

"Sherif ElMetainy" <el************ *@wayout.net.NO SPAM> wrote in message news:<eI******* *******@TK2MSFT NGP11.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*****@lineon e.net> wrote in message
news:fc******** *************** ***@posting.goo gle.com...
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

Nov 15 '05 #4
pr*****@lineone .net (Phil Ruelle) wrote in
news:fc******** *************** ***@posting.goo gle.com:
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/
"Programmin g is an art form that fights back"
Nov 15 '05 #5
pr*****@lineone .net (Phil Ruelle) wrote in
news:fc******** *************** ***@posting.goo gle.com:
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/
"Programmin g 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
5401
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 developed by many. Can any body please tell me what is strength and weakness of both Thick Client compared to Web client ?
2
2401
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 decided to do it as a Windows Forms client application, hooking up to a central SQL Server, and then maybe later create an asp version of the client if needed. I have a couple of questions on the setup: 1) The clients will be going through the...
7
3296
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 protocols may be TCP, IPX, SAP, NETBEUI to access the server to access the functionalities exposed. The server doesnot know in advance which client is using what protocol. ALSO, ALL THE INTERACTION WILL BE MADE OVER XML. example my server has...
3
1563
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 to a SQL Server database, and to access the database from Enterprise Manager (running locally). First of all - what does anybody think of that as a general idea - local client, connecting to MS SQL Server running on a shared host, connecting...
18
7363
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 client-side javascript. I forgot to bookmark it, and now I can't find it. Anyone?
67
3008
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 no lan. The machine will actually be running the MSDE. Windows XP Home. I'm quite happy, for now, to put all the business logic in SQL Server. Triggers, SPs etc. I've got a fair bit of Access development experience.
3
2654
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 on the subject? (and yes, I have already googled it at length, but still no strong decision) ============= After a long stint of pure-desktop / pure-server applications, I'm currently working on a number of smart-client projects in C# using...
9
2408
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 when I give a path like @"C:\holdfiles\myfile.txt" it looks on the server C drive. How do I pull from the client? Do I need a different class and/or method? Filestream? -- Thanks,
5
2906
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 front end to SQL server if we ever needed to go that route. But - is there a client/server version of Access ? Looking on the CDW site there is a bewildering variety of packages and licences and such, but we can't figure out just which do...
22
6251
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 client (MS Access vs ..NET Windows Forms) would be preferred over the other. While I have some good arguments on both sides, I would appreciate your points of view on the topic.
0
8172
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8677
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8620
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8474
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7158
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6110
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5563
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4079
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2605
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.