Sharepoint Web 部件中的错误

发布于 2024-11-17 16:25:36 字数 1558 浏览 3 评论 0原文

当我尝试从 Web 部件内的 Https Web 服务调用方法时,出现以下错误。我运行的是 WIN2k3 SP 2007。

System.ServiceModel.CommunicationException:向 https://xyz.local:8000 发出 HTTP 请求时发生错误/path_to_endpoint。这可能是由于在 HTTPS 情况下未使用 HTTP.SYS 正确配置服务器证书。这也可能是由于客户端和服务器之间的安全绑定不匹配造成的。 ---> System.Net.WebException:基础连接已关闭:发送时发生意外错误。 ---> System.IO.IOException:由于数据包格式意外,握手失败。在System.Net.Security.SslState.StartReadFrame(Byte []缓冲区,Int32 readBytes,AsyncProtocolRequest asyncRequest)在System.Net.Security.SslState.StartReceiveBlob(Byte []缓冲区,AsyncProtocolRequest asyncRequest)在System.Net.Security.SslState。 ForceAuthentication(布尔 receiveFirst, Byte[] 缓冲区, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)在System.Threading.ExecutionContext.runTryCode(对象userData)在System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode代码,CleanupCode backoutCode,对象userData)在System.Threading。 ExecutionContext.Run(ExecutionContextexecutionContext,ContextCallback回调,对象状态)在System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult 结果)在 System.Net.TlsStream.Write(Byte[] 缓冲区,Int32 偏移量,Int32 大小)在 System.Net.PooledStream.Write(Byte[] 缓冲区,Int32 偏移量,Int32 大小) ) at System.Net.ConnectStream.WriteHeaders(Boolean async) --- 内部异常堆栈跟踪结束 --- at System.Net.HttpWebRequest.GetResponse() 在 System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan 超时)

任何人都可以帮我解决这个问题吗?

I get the below error when I try to call a method from Https web service inside a web part. I am running WIN2k3, SP 2007.

System.ServiceModel.CommunicationException: An error occurred while making the HTTP request to https://xyz.local:8000/path_to_endpoint. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: The handshake failed due to an unexpected packet format. at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) at System.Threading.ExecutionContext.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size) at System.Net.ConnectStream.WriteHeaders(Boolean async) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)

Can anyone help me resolve this problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

输什么也不输骨气 2024-11-24 16:25:36

您能否启用 system.net 跟踪以便我们可以看到发生了什么?

http://msdn.microsoft.com/en-us/library/ty48b824.aspx

Can you enable system.net tracing so we can see whats going on?

http://msdn.microsoft.com/en-us/library/ty48b824.aspx

染火枫林 2024-11-24 16:25:36

找到了解决方案,

问题是作为 Http 驻留的 Web 服务。但是,当进行引用时,web.config 使用 httpstransport 方法定义了 Web 服务。

httpstransport 方法更改为 httptransportmethod,效果非常好。

Found the solution,

The issue was the web service which was residing as Http. However, when the reference was made, web.config defined the web service using the httpstransport method.

Changed the httpstransport method to httptransportmethod and it worked like charm.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文