Running FTPS from the ASP.NET page

I

Innokentiy Ivanov

Good afternoon,

We are developing a client-side FTP component with SSL capabilities and are
facing the below issue when the component is used from the ASP.NET web page.

Connection to the FTP server is established fine and we are able to send
commands which only involve the use of FTP control channel (such as pwd,
cwd, user, pass etc.). However, when we try to issue a LIST command (which
requires a secondary "data channel" connection), the passive data connection
is never established successfully.

We were able to narrow down the issue to the BeginConnect()/EndConnect()
function pair. It appeared that the delay between BeginConnect() and the
corresponding callback function calls that are to establish FTP data
connection reaches up to 3 minutes (!) time (and, consequently, our
component shuts data connection down by timeout). The problem only occurs if
the component is invoked from the ASP.NET web page; connection made by the
same code from winforms application on the same machine works fine. Another
interesting fact is that the problem has been only noticed by two of our
customers, and we in turn have never been able to reproduce it in our
environments.

Can anybody please suggest the possible reason for the issue? Are there any
restrictions for the number of opened socket connections from a web page?
Or, possibly, asynchronous socket calls are the case?

Thank you in advance.

With best regards,
Innokentiy Ivanov
 
S

sqlman

Good afternoon,

We are developing a client-side FTP component with SSL capabilities and are
facing the below issue when the component is used from the ASP.NET web page.

Connection to the FTP server is established fine and we are able to send
commands which only involve the use of FTP control channel (such as pwd,
cwd, user, pass etc.). However, when we try to issue a LIST command (which
requires a secondary "data channel" connection), the passive data connection
is never established successfully.

We were able to narrow down the issue to the BeginConnect()/EndConnect()
function pair. It appeared that the delay between BeginConnect() and the
corresponding callback function calls that are to establish FTP data
connection reaches up to 3 minutes (!) time (and, consequently, our
component shuts data connection down by timeout). The problem only occurs if
the component is invoked from the ASP.NET web page; connection made by the
same code from winforms application on the same machine works fine. Another
interesting fact is that the problem has been only noticed by two of our
customers, and we in turn have never been able to reproduce it in our
environments.

Can anybody please suggest the possible reason for the issue? Are there any
restrictions for the number of opened socket connections from a web page?
Or, possibly, asynchronous socket calls are the case?

Thank you in advance.

With best regards,
Innokentiy Ivanov

Kesha,

This may be a security issue. (Although I am just brainstorming here.)
You WinForms client is being executed under an interactive user
account, while any ASP.NET app has the identity of the ASPNET (or
NETWORK SERVICE) local account, unless specifically changed. The
former may have less privileges when it comes to making external
connections. Consider temporarily escalating the security level of
the account, or use impersonation, and see whether that will make any
difference.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top