.net调用双向ssl webservice 提示403 失败: Access Forbidden
问题如题,页面提示信息为:
请求因 HTTP 状态 403 失败: Access Forbidden。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.Net.WebException: 请求因 HTTP 状态 403 失败: Access Forbidden。
源错误:
行 49: [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SayHelloWorld", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
行 50: public string SayHelloWorld() {
行 51: object[] results = this.Invoke("SayHelloWorld", new object[0]);
行 52: return ((string)(results[0]));
行 53: }
源文件: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\myweb\93c85b67\dcf94de3\App_WebReferences.czum8pjq.2.cs 行: 51
堆栈跟踪:
[WebException: 请求因 HTTP 状态 403 失败: Access Forbidden。]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +431201
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204
sayhello.HelloWorld.SayHelloWorld() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\myweb\93c85b67\dcf94de3\App_WebReferences.czum8pjq.2.cs:51
_Default.Button3_Click(Object sender, EventArgs e) in f:\Web\MyWeb\Default.aspx.cs:94
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
---------------------------------------------------
接受客户证书以及忽略客户证书时都可以正常运行,而要求客户证书时就提示以上错误。。。
希望高手给以详解。。。