2012-07-18 1 views
1

처음에는 약간의 배경이 있습니다 :ASP .NET에서 호스트 될 때 WCF에서 Net Named Pipe의 이름을 어떻게 설정합니까?

다른 culture (web.config에서 설정)에서 각각 동일한 ASP .NET 응용 프로그램의 4 인스턴스를 실행하는 웹 서버가 있습니다. 문화는 영국 (GBR), 호주 (AUS), 아일랜드 (IRL), 뉴질랜드 (NZL)입니다. 그들 각각은 하나의 스케줄 된 작업을 통해 호출하고 싶은 웹 메소드 "DoWork"를 가지고 있습니다.

다음의 app.config이처럼 보이는 방법을 소모하는 작업에서

Dim AUSclient As New AUSAutomated.AUSAutomatedClient() 
AUSclient.DoWork 
Dim GBRclient As New GBRAutomated.GBRAutomatedClient() 
GBRclient.DoWork 
Dim IRLclient As New IRLAutomated.IRLAutomatedClient() 
IRLclient.DoWork 
Dim NZLclient As New NZLAutomated.NZLAutomatedClient() 
NZLclient.DoWork 

: 나는 네 문화의 각이 메소드를 호출하는 간단한 EXE, 단순화 된 코드를

 <endpoint address="net.pipe://localhost/Services/GBR/GBRAutomated.svc" 
      binding="netNamedPipeBinding" bindingConfiguration="NetNamedPipeBinding_IGBRAutomated" 
      contract="GBRAutomated.IGBRAutomated" name="NetNamedPipeBinding_IGBRAutomated"> 
       </endpoint> 

     <endpoint address="net.pipe://localhost/Services/IRL/IRLAutomated.svc" 
binding="netNamedPipeBinding" bindingConfiguration="NetNamedPipeBinding_IIRLAutomated" 
contract="IRLAutomated.IIRLAutomated" name="NetNamedPipeBinding_IIRLAutomated"> 
        </endpoint> 

     <endpoint address="net.pipe://localhost/Services/NZL/NZLAutomated.svc" 
      binding="netNamedPipeBinding" bindingConfiguration="NetNamedPipeBinding_INZLAutomated" 
      contract="NZLAutomated.INZLAutomated" name="NetNamedPipeBinding_INZLAutomated"> 
        </endpoint> 

응용 프로그램은 net 명명 된 파이프 바인딩을 사용하여 WCF를 통해 웹 메서드를 노출합니다. 각 문화권에는 올바른 서비스를 가리 키기 위해 web.config에 항목이 있습니다. 예를 들어 아일랜드는 다음과 같습니다.

<service name="Web.IRLAutomated"> 
      <endpoint address="net.pipe://localhost/Services/IRL/IRLAutomated.svc" binding="netNamedPipeBinding" contract="Web.IIRLAutomated" /> 
     </service> 

따라서 각 문화권에 대한 노출 된 방법은 계약 및 주소가 다릅니다.

작업이 실행되면 Australian Method를 모두 4 번 호출합니다. web.configs의 설정을 무시하고 첫 번째 응용 프로그램에서 올바른 계약으로 메소드를 호출하는 것 같습니다. 그래서 내 질문 :

각 문화권의 메서드에 고유 한 파이프 이름을 설정하려면 어떻게해야합니까?

바인딩에서 hostNameComparisonMode = "정확한"설정을 시도했지만 어떤 차이도 없었습니다.

답변

0

일부 검색 내가 여기에 StackOverflow에 비슷한 질문을 발견 한 후 당신은

수 없습니다 : 아무도 2 년에 위의 질문에 대답하지 않았다으로

controlling the name of a named pipe when hosting WCF net.pipe binding in IIS

을 내가 있으리라 믿고있어 내가하려고하는 것은 불가능합니다.

것은 다른 사람이 문제의이 종류와 나는 나를 이해하고 도움이 블로그 항목이 매우 도움이 발견 어려움을 겪고있는 경우 : 나는 내 문제를 해결할 수있는 HTTP 바인딩 변경하기 위하여려고하고있다

http://blogs.charteris.com/blogs/chrisdi/archive/2008/05/19/exploring-the-wcf-named-pipe-binding-part-1.aspx

.