繁体   English   中英

从DMZ到Intranet的双通道WCF

[英]Duplex channel WCF from DMZ to Intranet

我们正在域内运行双通道服务。 我们在端口20120上有一个TCP绑定,在端口20121上有一个HTTP绑定。

在DMZ(网络)中,我们要访问此WCF服务。 防火墙似乎已从网络打开到服务。 使用telnet,我可以同时访问两个端口,也可以从Web浏览器浏览WSDL。 现在,当我尝试从Web应用程序连接到服务时(它使用TcpBinding,并且如果不重新部署新的二进制文件就无法轻松地将其更改为HttpBinding,这是一个痛苦的过程),我遇到了一个异常。

System.ServiceModel.CommunicationException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:00:59.9680000'.

System.ServiceModel.Channels.StreamConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper)
System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
System.ServiceModel.Channels.ServiceChannelProxy.ExecuteMessage(Object target, IMethodCallMessage methodCall)
System.ServiceModel.Channels.ServiceChannelProxy.InvokeChannel(IMethodCallMessage methodCall)
System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
System.ServiceModel.ICommunicationObject.Open(TimeSpan timeout)
System.ServiceModel.ClientBase`1.System.ServiceModel.ICommunicationObject.Open(TimeSpan timeout) ...

我们的测试环境全部是Intranet,因此没有DMZ。 在那里一切正常。

服务本身以域用户身份运行,并且客户端服务行为已配置其userPrincipal(例如username@domain.ext)。 这需要访问domain.exe的域控制器吗?

我还在服务端启用了WCF日志记录,但是在那里什么也没有发生。 一切都相当,就像那里什么都没发生。 我还有其他地方想念一下为什么连接断开了吗?

EDIT1:我编写了一个小测试程序,该程序建立了wcf连接并调用了2个方法。 在与该服务相同的机器上以及从dmz网站上都可以正常工作。 绑定设置相同。 (确认)。 我从dmz Web机上的普通控制台以本地用户身份运行测试。 有什么提示吗?

好了,我们将安全模式更改为none <security mode="None"/> ,现在Web可以访问了。 我认为问题是,即使我在运行测试程序时使用了本地用户,我用来从域访问dmz的vpn / rdp会话也给安全性造成了漏洞,而且我能够连接到wcf服务。 Web侧没有该孔,因此失败了。

暂无
暂无

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

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