开发者

Simulate Latency with ASP.NET

开发者 https://www.devze.com 2023-03-22 21:49 出处:网络
I\'m developing an AJAX-heavy site with JavaScript MVC and an ASP.NET MVC server.To test some of the client-side caching and get a better idea of where to put loading gif开发者_运维技巧\'s and message

I'm developing an AJAX-heavy site with JavaScript MVC and an ASP.NET MVC server. To test some of the client-side caching and get a better idea of where to put loading gif开发者_运维技巧's and messages into the site I would like to artificially simulate some latency on the server.

I guess the easiest way would be to use a Global Action Filter and simply do a Thread.Sleep, but this won't work for when the client loads JavaScript files and other content.

I'm guessing I can do this with an HttpModule, but I'm note sure.

Any ideas?

Edit: This is for testing on my local/development machine, using IIS Express


Looks like most straightforward solution would be to leverage bandwidth throttling by reconfiguring IIS: Enabling Bandwidth Throttling (IIS 6.0)

Also here is a trick to simulate a modem connection when using a Fiddler using the menu option

Rules > Performance > Simulate Modem speeds

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号