Login  
Search All Forums
Dart Home | PowerTCP FTP for .NET | Custom Development Reply | PowerTCP FTP for .NET Topics | Forums   
AuthorForum: PowerTCP FTP for .NET
Topic: FTP Progress Indication with ASP.NET
psved

From: austin, TX USA
Posts: 3
Member Since: 07/13/02
posted July 14, 2002 5:00 PM

anybody has any luck with showing ftp file progress indication with asp.net?

I should mention that I am a novice at web programming so excuse me if I am doing something really stupid.

I am trying to show the bytesTransferred in a label control on an asp.net form. This simply does not work. When I debug the code, I can see the label.text value getting updated but cannot see the updates on the webpage. I am using BeginGet:EndGet combination and have successfully registered the Progress Event too (thanks to some excellent documentation that comes along with this product).
Any ideas?

all the help is appreciated.
Jeff Cranford



From: Rome, NY USA
Posts: 586
Member Since: 05/30/01
posted July 16, 2002 9:33 AM

Yes, this is a common mistake when transitioning from Windows to web programming. The ASP (and ASP.NET) system by nature is synchronous.

Here is the anticipated execution for an ASP/ASP.NET Script

Get HTTP Request
Do lots of blocking processing.
When processing is complete, send HTTP response.
User sees results in browser.

Here is what you are attempting to do. (Also, you mention you are using the asynchronous BeginGet method to get the file. I'm not sure how you've been successful using this method in ASP.NET but I would advise not using it for your purposes unless you have a really really good reason. This demonstrates the Ftp.Get method.).

Get HTTP Request
Call Ftp.Get
Progress event fires, update value of Label.Text // This step repeated until file is done transferring.
Processing complete, send HTTP response.
User sees result in browser. // User only sees last value of Label.Text here. Doh!

So what is the solution??

There are some techniques that can be implemented here to get something close to the effect that you want. Since this forum is not intended for mass-code posting, send an email to support@dart.com (ATTN Jeff Cranford) if you are interested in learning more.
Reply | PowerTCP FTP for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX