简体   繁体   English

我可以在控制台应用程序中调用ASP.net页面处理程序吗?

[英]Can i invoke ASP.net page handler in console app?

I want to get 20000 HttpRequest or Page.Request instances from console app in less than 10 min. 我想在不到10分钟的时间内从控制台应用程序获得20000个HttpRequest或Page.Request实例。 Anyone knows how to do it? 有人知道该怎么做吗?

I am able to get 20000 instances in a very inefficient way: in the first asp.net page using HTTPWebRequest to call the second asp.net page. 我能够以一种非常低效的方式获取20000个实例:在第一个asp.net页面中,使用HTTPWebRequest调用第二个asp.net页面。 Then get the Page.Request of the second page stored in Application object and retrieve it from the first page in the same web application but it takes about 30 mins for 20000 Page.Request. 然后获取存储在Application对象中的第二个页面的Page.Request,并从同一Web应用程序中的第一个页面检索它,但是20000 Page.Request大约需要30分钟。

I added Thread.Sleep(80) in the first page otherwise it will give "Only one usage of each socket address (protocol/network address/port) is normally permitted ". 我在第一页中添加了Thread.Sleep(80),否则它将给出“通常只允许每个套接字地址(协议/网络地址/端口)使用一种”。

I think it's too long. 我觉得太久了。 just wondering if there is any better way to do it. 只是想知道是否还有更好的方法可以做到。

appreciate any help. 感谢您的帮助。

Microsoft Web Application Stress Tool Microsoft Web应用程序压力工具

http://www.iis.net/downloads/default.aspx?tabid=34&g=6&i=1298 http://www.iis.net/downloads/default.aspx?tabid=34&g=6&i=1298

Been a long time since I've used it, but I'm fairly certain you can invoke it and start a test from the command line. 自从我使用它已经很长时间了,但是我可以肯定您可以调用它并从命令行开始测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM