473,386 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Application to download files using BITS from remote serve

I am working on an BIT application to download files from remote server using
C#, There are an issue related with performance, I am downloading 3 files
28Kb, 79KB, 121KB respectivly on my system(Pentium 4, RAM 512MB, DSL
connection) it is taking 15 to 25 seconds and shows 55-56 mx CPU usage but
other system with same configuration and T1 Line its taking so much time, it
is downloading these 3 files in hours and shows 100% CPU usage regularly, i
am not able to find out any solution, i have tried setting in Group Policy
and advance setting but this issue did not resolve.

could you please let me know the solution for it.
I am using following method to download those three files.

public void DownLoadFile(string GhostPath, string WebURL)
{
char ch='/';
try
{
Manager myBits = new Manager();
Job myJob = myBits.CreateJob( WebURL.Substring(WebURL.LastIndexOf(ch)+1 ));
myJob.AddFile(GhostPath,WebURL);
myJob.ResumeJob();

do
{
if(myJob.State == JobState.Connecting)
{
if(myJob.State == JobState.Transferring)
{
do
{
Resume(myJob);
}while( myJob.State==JobState.Transferring);
}
}
else if(myJob.State ==JobState.Transferring)
{
do
{
Resume(myJob);
}while( myJob.State==JobState.Transferring);

if(myJob.State==JobState.Transferred)
{
myJob.Complete();
Cursor.Current = Cursors.WaitCursor;
}
}
else if(myJob.State ==JobState.Suspended)
{
do
{
Resume(myJob);
}
while( myJob.State==JobState.Suspended);
}
else if(myJob.State == JobState.Queued)
{
do
{
Resume(myJob);
}
while( myJob.State==JobState.Queued);
}
else if(myJob.State ==JobState.Transferred)
{
myJob.Complete();
Cursor.Current = Cursors.WaitCursor;
return;
}
else if(myJob.State == JobState.Acknowledged)
{
return;
}
else if(myJob.State == JobState.Errors || myJob.State ==
JobState.TransientError )
{
myJob.Cancel();
}
}while( myJob.State != JobState.Transferred && myJob.State !=
JobState.Errors && myJob.State != JobState.TransientError && myJob.State
!=JobState.Queued);
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
Oct 6 '05 #1
0 1708

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

Similar topics

17
by: Kevin Goodsell | last post by:
Is there a place I can download the last public draft for C89? What about a draft for C95? What I really need is a list of all standard library functions, macros, types, etc. for a "keyword...
0
by: Rhon Stewart via DotNetMonster.com | last post by:
Hi please visit this link : http://www.eggheadcafe.com/articles/pfc/selfupdater.asp I followed all the steps for listed on the link , when I execute the application it it gives me the following...
0
by: Rhon Stewart via DotNetMonster.com | last post by:
Please visit the following link: http://www.eggheadcafe.com/articles/pfc/selfupdater.asp Here A complete code for using Application updater , I downloaded the code from the link. When I run the...
1
by: shekhartgs | last post by:
Please tell me how to debug an ASP.NET web application residing on a remote server? Can you pls tell me point by point as I am a new bie to a lil extent. Also please alert me where errors...
0
by: Sachit | last post by:
I am working on an BIT application to download files from remote server using C#, There are an issue related with performance, I am downloading 3 files 28Kb, 79KB, 121KB respectivly on my...
5
by: sc48567189 | last post by:
Hello ! I need some help here. I google after the response but with no sucess. I need to download - randon size - parts of a file, not the whole file. Says: I have the zip file test.zip, it is 10...
2
by: DBC User | last post by:
Hi, I am looking for a 3rd party software that I can integrate with my app to do download files from the web. I saw some software they are all end user software, I don't see any development...
6
by: Senthil | last post by:
Hi All We are having a VB application on SQL. But we need to collect information from persons who will be offline to verify data and insert new data. Generally they will be entering the data in...
3
by: axelman | last post by:
Hi guys, I'm using Classic ASP, IIS6, IE 7, FF 3 I've developed a vb script to downloand files hosted in my server (zip, doc, pdf, jpg, xls, et. etc.) it's very straight forward and there's a ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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,...
0
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...

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.