Serghei
Serghei

Reputation: 21

How to measure upload and download internet speed with silverlight and ASP.NET MVC

How to measure upload and download internet speed with silverlight and ASP.NET MVC between client and server. How I think it's need to download/upload a file on the server.

Please help me with this problem Thanks in advance

Upvotes: 2

Views: 3578

Answers (3)

ThatSteveGuy
ThatSteveGuy

Reputation: 1095

You realize, of course, that the results of your test will be completely dependent on the internet connection that you are using to run the test. From what I am reading, your really just testing your internet connection, which you can do on various websites, such as www.speedtest.net.

Upvotes: 0

Dave Swersky
Dave Swersky

Reputation: 34810

Sounds like you are trying to recreate SpeedTest.net. They use Flash, but the concepts should be roughly the same.

If you're referring to ASP.NET MVC because the Silverlight app is hosted on it, I'm not sure it will impact your design. This assumes that all the speed testing logic and UI is implemented in the Silverlight application.

Here's a good article from Laurent Bugnion on downloading files using WebClient: http://www.galasoft.ch/mydotnet/articles/article-2008032301.html

That should give you all the information you need to download the file to the client, display a progress bar, and be notified when the download is complete. Using a fixed-size dummy data file, you can easily calculate the speed based on the size and time to download. The file should be fairly large but not too large, say 10 - 15Mb. That will ensure an accurate estimate of speed for both slow and very fast connections.

Uploading will work the same way in reverse. KrystalWare's SlickUpload component should have all the features you need.

Upvotes: 1

Scott Chamberlain
Scott Chamberlain

Reputation: 127603

The quick and dirty way to do it is just transfer a file to the client and have it send it back.

What you will need to do is have a file of known size, download it to the client, take the filesize/time to transfer and that is your download speed. Do the reverse process to get the upload speed.

It is a good idea to have a file at least a few MB in size so it can average out the peeks and valleys in the transfer.

Upvotes: 0

Related Questions