获取错误无法找到名称为“CaseJacketPort”且合同为“GrandJuryService.CaseJacket”的端点元素

private void InitProxy()
{
    m_Proxy = new DivisionAssignmentJSS.GrandJuryService.CaseJacketClient("CaseJacketPort");  << error here

从我的App.config:

<client>
   <endpoint address="http://172.24.8.125:8080/grandjury/CaseJacketService"
        binding="customBinding" bindingConfiguration="CaseJacketPortBinding1"
        contract="GrandJuryService.CaseJacket" name="CaseJacketPort" />
</client>

以及

<binding name="CaseJacketPortBinding1">
  <security defaultAlgorithmSuite="Basic128" 
            authenticationMode="UserNameForCertificate"
            requireDerivedKeys="false" securityHeaderLayout="Strict" 
            includeTimestamp="true" keyEntropyMode="CombinedEntropy" 
                messageProtectionOrder="SignBeforeEncrypt"
messageSecurityVersion="WSSecurity11WSTrust13WSSecureConversation13WSSecurityPolicy12BasicSecurityProfile10" requireSignatureConfirmation="false">
        <localClientSettings cacheCookies="true" detectReplays="true"
          replayCacheSize="900000" maxClockSkew="00:05:00" maxCookieCachingTime="Infinite"
          replayWindow="00:05:00" sessionKeyRenewalInterval="10:00:00"
          sessionKeyRolloverInterval="00:05:00" reconnectTransportOnFailure="true"
          timestampValidityDuration="00:05:00" cookieRenewalThresholdPercentage="60" />
        <localServiceSettings detectReplays="true" issuedCookieLifetime="10:00:00"
          maxStatefulNegotiations="128" replayCacheSize="900000" maxClockSkew="00:05:00"
          negotiationTimeout="00:01:00" replayWindow="00:05:00" inactivityTimeout="00:02:00"
          sessionKeyRenewalInterval="15:00:00" sessionKeyRolloverInterval="00:05:00"
          reconnectTransportOnFailure="true" maxPendingSessions="128"
          maxCachedCookies="1000" timestampValidityDuration="00:05:00" />
        <secureConversationBootstrap />
      </security>
      <textMessageEncoding 
             maxReadPoolSize="64" maxWritePoolSize="16"
             messageVersion="Soap11WSAddressing10" writeEncoding="utf-8">
          <readerQuotas 
                 maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                 maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      </textMessageEncoding>
      <httpTransport 
            manualAddressing="false" maxBufferPoolSize="524288"
            maxReceivedMessageSize="6553600" allowCookies="false" 
            authenticationScheme="Anonymous"
            bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
            keepAliveEnabled="true" maxBufferSize="6553600" 
            proxyAuthenticationScheme="Anonymous" realm="" 
            transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"
            useDefaultWebProxy="true" />
    </binding>

不知道他们为什么看不到对方?
错误显示<!>“;这可能是因为找不到您的应用程序的配置文件, 或者因为在客户端元素中找不到与此名称匹配的端点元素。<!> quot;

当i ^ F并搜索指针时,他们看起来都指向彼此。

有什么想法吗?

TIA

__斯蒂芬

有帮助吗?

解决方案

正如其他人可以看到解决方案而不必吐出评论。

你的代码在DLL中也是如此?在这种情况下,启动的应用程序中的app.config需要WCF配置。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top