2012-02-03 2 views
0

기존 명명 된 파이프 서버에 대한 연결을 작성해야하는 클래스 라이브러리가 있습니다. 내가 오류는 다음과 같습니다 여기 명명 된 파이프 클라이언트가 시작되지 않습니다.

<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="[email protected]" /> 
      </identity> 
     </endpoint>    
    </client> 
</system.serviceModel> 

내가 클라이언트를 실체화하는 데 사용하는 코드이며, 또한 오류가 발생합니다 여기서 :

다음

Could not find endpoint element with name 'internal' and contract 'SelectedStudentReference.ISelectedStudent' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this name could be found in the client element.

는 dll.config에서 XML이다

using AwardManager.SelectedStudentReference; 

if (_client == null) _client = new SelectedStudentClient("internal"); 

서버가 실행 중이고 오류 메시지에 클라이언트 오류 만 언급되어 있음을 알고 있습니다. 클래스 라이브러리에서이 문제가 있습니까? 설치 프로그램은 dll로 .config 파일을 복사하지 않았습니다. 수동으로했기 때문에 .dll이 .config에주의를 기울이고 있는지 확실하지 않습니다.

이것은 등록되어 있고 다른 프로세스에서 인스턴스화되고 호출 된 dll입니다. 이 system.serviceModel을 다른 프로세스의 .config에 추가 할 수 없습니다.

클라이언트를 코드로 작성할 수 있습니다. 작동한다면 어떻게 할 것인가?

또한 userPrincipleName에 대한 도움말을 사용할 수 있습니다. 내 자격 증명을 사용하는 것이 맞지 않는 것 같습니다. 사용자의 자격 증명 또는 일부 일반 자격 증명을 지정하면 안됩니까? 클라이언트 구성에 포함시킬 필요가 있습니까?

감사

답변

0

이 물건은 DLL를 호스팅하는 EXE에 대한 설정 될 필요가있다. DLL에는 독립 실행 형 구성이 없습니다. 또는 사용자 지정 작업을 수행하지 않으면 .NET이 적어도이를 읽지 않습니다.

호스팅 EXE 구성을 수정할 수없는 경우 코드에서이 구성을 작성해야합니다.