Groups | Blog | Home
all groups > dotnet distributed apps > march 2004 >

dotnet distributed apps : Authentication through sockets


Manish Buttan
3/10/2004 1:11:06 AM
Hi
I want to connect to my FTP Server through the authenticated proxy server. My application works behind the proxy when there is no authentication enabled at the proxy server. I am unable to pass the authentication to the socket once the proxy server is authenticated.
So can you please help me as how to pass the username/password to get connected to the proxy server through sockets

Regards
Manish Buttan
3/11/2004 10:16:07 PM
Hi Stefan
I am writing a FTP client application in C#.
My problem is connecting to my FTP Server accross an authenticated proxy server i.e my application is behind an authenticated proxy server and FTP server is directly on the web
My application uses dotnet socket class to connect to the proxy and then to my FTP Server, and works if the proxy is not authenticated
The call to socket's Connect method gives a response "User Invalid" when the proxy requires authentication while connecting to the proxy
The Socket class does not provide any methods /properties to assign any authentication parameters
So how can I pass authentication credentials to the proxy

Thanks

Manish
sschac NO[at]SPAM online.microsoft.com (
3/11/2004 11:43:01 PM
Hi Manish,
Can you provide us a little bit more information ...

[quoted text, click to view]
I want to connect to my FTP Server through the authenticated proxy
server.

You or your application?

My application works behind the proxy when there is no authentication
enabled at the proxy server.
What does your app do ?

I am unable to pass the authentication to the socket once the proxy server
is authenticated.
Are you getting any error message? What type of proxy server are you using?

So can you please help me as how to pass the username/password to get
connected to the proxy server through sockets.

Regards,
Manish.
[quoted text, click to view]

Thanks,

Stefan Schachner
Microsoft Community Tech Lead
This posting is provided “AS IS” with no warranties, and
confers no rights.
sschac NO[at]SPAM online.microsoft.com (
3/15/2004 3:23:29 PM
Manish,
Are you going to be using a tunneling protocol? VPN/IPSec/L2TP? I was
trying to get an understanding of why you would need authentication for an
FTP application since everything is passed over the wire in clear text..
There a number security risks using authentication over sockets to an ftp.
FTP challenges for credentials only at login time, all other authenication
is "trusted" based on negotiated ports...ie. its prone to man-in-the-middle
attacks where a 3rd party can intercept the communication channel and take
over the FTP session and the server wouldn't ever rechallenge for creds, so
this person would not even need to know the creds (though they are sent in
clear text, so if they had access to the wire, they would have them
anyway).

I would recommend using BITS as the client-side transfer agent then you can
take advantage of restarts and scheduling, so you actually get more
flexibility than FTP.

For more information on using BITS...
818746 White Paper: Background Intelligent Transfer Service in Windows
Server
http://support.microsoft.com/?id=818746

In conclusion the traffic will not be secure unless you are using a
tunneling protocol.. At this point there is no difference in prompting the
user or not prompting at the proxy anyone with 3rd party tool can intercept
the connection. So at this point I would recommend using BITS...

I hope this makes sense...

Thanks
Stefan



--------------------
[quoted text, click to view]
I am writing a FTP client application in C#.
My problem is connecting to my FTP Server accross an authenticated proxy
server i.e my application is behind an authenticated proxy server and FTP
server is directly on the web.
My application uses dotnet socket class to connect to the proxy and then
to my FTP Server, and works if the proxy is not authenticated.
The call to socket's Connect method gives a response "User Invalid"
when the proxy requires authentication while connecting to the proxy.
The Socket class does not provide any methods /properties to assign any
authentication parameters.
So how can I pass authentication credentials to the proxy?

Thanks,

Manish.

[quoted text, click to view]

Stefan Schachner
Microsoft Community Tech Lead
This posting is provided “AS IS” with no warranties, and
confers no rights.
AddThis Social Bookmark Button