There have to be a faster way cuz when i open my webbrower ( what take like 1sec ) and insert the Online-Text-File-Path i get the result in less then 50ms
and yes i tried the my...... method .... same downtime
vb.net should be able to get the content in this way. and asked for this way :P is there a possibility to use the http method without including a whole browser
think all these commands using the webresponse-methode and this takes time. Hope there is a better way ... there have to be a better way... just check out the most auto-updater. all just checking for new version in like 1-2 seconds
You will have to consider what is actually taking time. There is some thing you are not able to control in this case.
The time it takes to establish a connection to the server The time it takes to request the file from the server The time it takes to transfer the contents of the file
This is probably what takes 20 seconds and you should be able to measure it by taking the time it takes to step from the DL.DownloadFile() line to the next.
If it is about 20 seconds than that is where your bottleneck is. If this is the case your application can most likely do nothing to improve performance. You will need to look at the connection performance for your client and server.
A 100kb file takes about 20 seconds on a 5kb/s connection, a 56k modem.
TextFile online
itprochris
Have you tried
My.Computer.Network.DownloadFile
I'm not sure if its quicker but its pretty simple - takes two arguments, URL and destination file path
gsylvest
Is the URL one you are at liberty to disclose
Susan Entwisle
Have a look at the WebClient.DownloadFileAsync method, it downloads the file asynchronously in the background.
Its typically not a good idea to attempt to contact a web server on the UI thread anyway.
Are you sure that IE isn't downloading files from it's own cache, hence why it is fast
James Lye
There have to be a faster way cuz when i open my webbrower ( what take like 1sec ) and insert the Online-Text-File-Path i get the result in less then 50ms
and yes i tried the my...... method .... same downtime
vb.net should be able to get the content in this way.
and asked for this way :P is there a possibility to use the http method without including a whole browser
think all these commands using the webresponse-methode and this takes time. Hope there is a better way ... there have to be a better way... just check out the most auto-updater. all just checking for new version in like 1-2 seconds
memnoch
have a nice day
Steve4125
Or you could use httpWebRequest which will do the transfers asynchronously..
You will have full control of the form because the download will be occuring asynchronously and in parallel with whatever else you are doing.
I do not know what the time differential will be because I don't know where your bottle necks are.
But running a webrequest would be a good test.....
bsa
You will have to consider what is actually taking time. There is some thing you are not able to control in this case.
The time it takes to establish a connection to the server
The time it takes to request the file from the server
The time it takes to transfer the contents of the file
This is probably what takes 20 seconds and you should be able to measure it by taking the time it takes to step from the DL.DownloadFile() line to the next.
If it is about 20 seconds than that is where your bottleneck is. If this is the case your application can most likely do nothing to improve performance. You will need to look at the connection performance for your client and server.
A 100kb file takes about 20 seconds on a 5kb/s connection, a 56k modem.
Olivia Luo
You always have the option to implement your own client using the TcpClient class.
The overhead you are experiencing might be because you load a rich class like WebClient.