单元测试相互验证的 ASP.Net Web 服务
我打算使用 Visual Studio 提供的测试工具在 IIS 下测试 ASP.Net Web 服务。我跨越了许多障碍才达到这样的地步:如果需求只是要求服务器身份验证,那么一切都会好起来的。但是,需要相互验证。当我将 Web 服务设置为需要客户端证书时,测试会发出错误消息:
测试适配器“WebHostAdapter”在运行测试“GetDetails”时引发异常。网站无法正确配置;获取 ASP.NET 进程信息失败。服务器可能未运行 Asp.Net 2.0 或更高版本。请求“https://localhost/pcoombes/VSEnterpriseHelper.axd”返回错误:远程服务器返回错误:(403) 禁止。
我推测这是因为 UrlToTest 现在需要客户端证书。是否有可以使用的客户端证书属性? 我使用的是 VS 2008 和 IIS 5.1
I intended to test an ASP.Net webservice under IIS using the test facilities offered by Visual Studio. I have jumped many hurdles to get to the point where, had the requirements just called for server authentication, everything would have been fine. However, mutual authentication is required. When I set the web service to require a client certificate, the test emits the error message:
The test adapter 'WebHostAdapter' threw an exception while running test 'GetDetails'. The web site could not be configured correctly; getting ASP.NET process information failed. The server may not be running a version of Asp.Net version 2.0 or greated. Requesting "https://localhost/pcoombes/VSEnterpriseHelper.axd" returned an error: The remote server returned an error: (403) Forbidden.
I am presuming that this is because the UrlToTest now requires a client certificate. Is there a client certificate attribute one can use?
I am using VS 2008 and IIS 5.1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论