473,765 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(st ring GhostPath, string WebURL)
{
char ch='/';
try
{
Manager myBits = new Manager();
Job myJob = myBits.CreateJo b( WebURL.Substrin g(WebURL.LastIn dexOf(ch)+1 ));
myJob.AddFile(G hostPath,WebURL );
myJob.ResumeJob ();

do
{
if(myJob.State == JobState.Connec ting)
{
if(myJob.State == JobState.Transf erring)
{
do
{
Resume(myJob);
}while( myJob.State==Jo bState.Transfer ring);
}
}
else if(myJob.State ==JobState.Tran sferring)
{
do
{
Resume(myJob);
}while( myJob.State==Jo bState.Transfer ring);

if(myJob.State= =JobState.Trans ferred)
{
myJob.Complete( );
Cursor.Current = Cursors.WaitCur sor;
}
}
else if(myJob.State ==JobState.Susp ended)
{
do
{
Resume(myJob);
}
while( myJob.State==Jo bState.Suspende d);
}
else if(myJob.State == JobState.Queued )
{
do
{
Resume(myJob);
}
while( myJob.State==Jo bState.Queued);
}
else if(myJob.State ==JobState.Tran sferred)
{
myJob.Complete( );
Cursor.Current = Cursors.WaitCur sor;
return;
}
else if(myJob.State == JobState.Acknow ledged)
{
return;
}
else if(myJob.State == JobState.Errors || myJob.State ==
JobState.Transi entError )
{
myJob.Cancel();
}
}while( myJob.State != JobState.Transf erred && myJob.State !=
JobState.Errors && myJob.State != JobState.Transi entError && myJob.State
!=JobState.Queu ed);
}
catch(Exception ex)
{
MessageBox.Show (ex.ToString()) ;
}
}
Oct 6 '05 #1
0 1757

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

Similar topics

17
2300
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 file", which is used for syntax highlighting. I want to create one for both major C standards, with the C89/90 version including the 1995 amendment. I already have n869 for C99. Thanks.
0
5003
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 error on the log file: --- ApplicationUpdateManager.StartUpdater] : The Updater has started; the target application's name is 'SayHello'. Time started: 2005_03_01_14:33:21.
0
1708
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 application I found this error in the log: --- : The Updater has started; the target application's name is 'SayHello'. Time started: 2005_03_03_16:47:14.
1
1282
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 might come in the process of remote debug. Thanks a ton, shekhar
0
312
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 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...
5
1587
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 mega bytes long. But I don't want the 10 mega today. Today I want 5 mega bytes. Tomorrow I could want more 3 mega bytes of the file, but it is not sure, could be 4 mega bytes. I need to part the zip file in chunks at request. No CGI, no asp, no...
2
1271
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 software to integrate with ..net Is there a such software available? Thanks.
6
2983
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 Excel spread sheets which can be uploaded to the database using the application after some validations. But rather than Excel I was looking at Infopath with Access as the database, to create validation rules and collect data offline that can be...
3
9739
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 lot of information around the web, however when it comes to dowload files from a remote server (NOT hosted in my server) there is no information :-(, the idea is to have an Access DB that stores the full url...
0
9568
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9404
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
10164
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
10007
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
9835
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
8833
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
7379
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...
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.