如何使用Windows身份验证对网页进行负载测试 [英] How to load test a web page using Windows authentication

查看:97
本文介绍了如何使用Windows身份验证对网页进行负载测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为内部Web应用程序开发一些负载测试.

I'm in the process of developing some load tests for an internal web application.

该问题似乎与我们使用Windows身份验证有关.如果启动浏览器并导航到我们的应用程序,则可以访问该Web应用程序.但是,我无法在负载测试中通过webrequest访问该应用程序.它会引发401异常,未经授权.

The problem appears to be related to our use of Windows authentication. I can access the web application if I launch the browser and nevigate to our app. I can't, however, access the application via webrequest in my load test. It throws a 401 exception, Unauthorized.

我正在使用Visual Studio 2010 Ultimate.

I'm using Visual Studio 2010 Ultimate.

如何在负载测试中使用Windows凭据?还有其他想法吗?

How do I use my Windows credentials in my load test? Any other ideas?

推荐答案

我发现这可行...

 request.Credentials = System.Net.CredentialCache.DefaultCredentials;

这篇关于如何使用Windows身份验证对网页进行负载测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆