Wcf 命名管道客户赢得';开始
我有一个类库,它应该构建到现有命名管道服务器的连接。我得到的错误是: 在ServiceModel客户端配置部分中找不到名为“internal”且约定为“SelectedStudentReference.ISelectedStudent”的终结点元素。这可能是因为找不到应用程序的配置文件,或者在客户端元素中找不到与此名称匹配的端点元素 以下是dll.config中的xml:Wcf 命名管道客户赢得';开始,wcf,wcf-binding,wcf-security,wcf-client,Wcf,Wcf Binding,Wcf Security,Wcf Client,我有一个类库,它应该构建到现有命名管道服务器的连接。我得到的错误是: 在ServiceModel客户端配置部分中找不到名为“internal”且约定为“SelectedStudentReference.ISelectedStudent”的终结点元素。这可能是因为找不到应用程序的配置文件,或者在客户端元素中找不到与此名称匹配的端点元素 以下是dll.config中的xml: <system.serviceModel> <bindings>
<system.serviceModel>
<bindings>
<netNamedPipeBinding>
<binding name="internal" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false"
transferMode="Buffered" transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288"
maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="65536">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="Transport">
<transport protectionLevel="EncryptAndSign" />
</security>
</binding>
</netNamedPipeBinding>
</bindings>
<client>
<endpoint address="net.pipe://localhost/SelectedStudent" binding="netNamedPipeBinding"
bindingConfiguration="internal" contract="SelectedStudentReference.ISelectedStudent"
name="internal">
<identity>
<userPrincipalName value="name@company.org" />
</identity>
</endpoint>
</client>
</system.serviceModel>
我知道服务器正在运行,错误消息只提到客户端故障。在类库中执行此操作有问题吗?安装程序没有将.config与dll一起复制出去,我是手动复制的,所以我不确定.dll是否注意到了.config
这是一个已注册的COM可见dll,由另一个进程实例化和调用。我无法将此system.serviceModel添加到另一个进程的.config中
如果可以的话,我可以用代码构建客户机,并且我有一些如何实现的例子
我还可以在userPrincipleName上使用一些帮助。它使用我的凭据似乎不正确。它不应该指定用户的凭据或一些通用凭据吗?它甚至需要包含在客户端配置中吗
谢谢这些东西需要放在托管DLL的exe的配置中。DLL没有独立的配置,或者至少.NET不会读取它,除非您执行自定义操作 如果您不能修改托管EXEs配置,那么您可能必须在代码中构建此配置
using AwardManager.SelectedStudentReference;
if (_client == null) _client = new SelectedStudentClient("internal");