Microsoft MVP성태의 닷넷 이야기
WCF net.tcp 관련해서 질문 드립니다. [링크 복사], [링크+제목 복사]
조회: 14754
글쓴 사람
김응규 (elther at nate.com)
홈페이지
첨부 파일
 


 안녕하세요.

 WCF net.tcp를 이용해서 간단하게 프로젝트를 진행해보려고 하는데

 설정 단계에서 막혀버려서 답답합니다.


 서비스와 클라이언트가 한 컴퓨터 안에서 돌아갈때는 문제 없이 잘 돌아가는데

 서비스를 서버에 올리고 외부에서 붙으려고 하면

 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 소켓 연결이 중단되었습니다. 메시지 처리 오류 또는 원격 호스트에 의한 수신 시간 제한 초과, 또는 기본 네트워크 리소스 문제 때문일 수 있습니다. 로컬 소켓 시간 제한은 '00:00:09.9945955'입니다.

 
 이런 메세지가 나옵니다.

 어제는 10060 에러가 발생해서 호스팅 업체를 통해 포트를 열었는데, 그 후 잘될줄 알았으나.. 10060 에러는 사라지고 소켓 연결 에러가 나오네요..


 server config
 ----------------------------
 <?xml version="1.0" encoding="utf-8"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />
  </system.web>
  <system.serviceModel>
    <services>
      <service name="HelloWorldService.HelloWorldWCFService">
        <endpoint address="http://내 도메인/helloworld.svc" binding="basicHttpBinding"
          bindingConfiguration="" contract="HelloWorldService.IHelloWorld" />
        <endpoint address="net.tcp://내 도메인/HelloWorld.svc" behaviorConfiguration="endpointBehavior"
          binding="netTcpBinding" bindingConfiguration="tcpBinding" name="hellonettcpbinding"
          contract="HelloWorldService.IHelloWorld">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" behaviorConfiguration="endpointBehavior" binding="mexTcpBinding"
          bindingConfiguration="" name="mextcpbinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="net.tcp://내 도메인/HelloWorld.svc" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="">
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="endpointBehavior">
          <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true"
      multipleSiteBindingsEnabled="true" />
    <bindings>
      <netTcpBinding>
        <binding name="tcpBinding" receiveTimeout="00:01:30" >
          <security mode="None"/>
          <reliableSession enabled="true" inactivityTimeout="00:00:10" ordered="true" />
        </binding>
      </netTcpBinding>
    </bindings>
  </system.serviceModel>
  <system.diagnostics>
    <trace autoflush="true" />
    <sources>
      <source name="System.ServiceModel"
              switchValue="Information, ActivityTracing"
              propagateActivity="true">
        <listeners>
          <add name="sdt"
              type="System.Diagnostics.XmlWriterTraceListener"
              initializeData="SdrConfigExample.e2e" />
        </listeners>
      </source>
    </sources>
  </system.diagnostics>
</configuration>


 
 client config
 -----------------------
 <?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
    </startup>
    <system.serviceModel>
        
        <behaviors>
            <endpointBehaviors>
              <behavior name="endpointBehavior">
                <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
              </behavior>
            </endpointBehaviors>
        </behaviors>
        <bindings>
            <basicHttpBinding>
                <binding name="BasicHttpBinding_IHelloWorld" />
            </basicHttpBinding>
            <netTcpBinding>
              <binding name="NetTcpBinding_IHelloWorld">
                <security mode="None"/>
                <reliableSession enabled="true" inactivityTimeout="00:00:10" ordered="true" />
              </binding>
            </netTcpBinding>
        </bindings>
        <client>
            <endpoint address="http://내 도메인/HelloWorld.svc" binding="basicHttpBinding"
                bindingConfiguration="BasicHttpBinding_IHelloWorld" contract="ServiceReference1.IHelloWorld"
                name="BasicHttpBinding_IHelloWorld" />
            <endpoint address="net.tcp://내 도메인/HelloWorld.svc" binding="netTcpBinding"
                bindingConfiguration="NetTcpBinding_IHelloWorld" contract="ServiceReference1.IHelloWorld"
                name="NetTcpBinding_IHelloWorld">
                <identity>
                    <servicePrincipalName value="host/WIN2012-STD" />
                </identity>
            </endpoint>
        </client>
    </system.serviceModel>

  <system.diagnostics>
    <trace autoflush="true" />
    <sources>
      <source name="System.ServiceModel"
              switchValue="Information, ActivityTracing"
              propagateActivity="true">
        <listeners>
          <add name="sdt"
              type="System.Diagnostics.XmlWriterTraceListener"
              initializeData="SdrConfigExample.e2e" />
        </listeners>
      </source>
    </sources>
  </system.diagnostics>
</configuration>




 후움.. 원인이 무엇일까요 ㅠㅠ.. 거의 다 온것 같은데..
 








[최초 등록일: ]
[최종 수정일: 4/22/2015]


비밀번호

댓글 작성자
 



2015-04-22 02시32분
사이트에 올라와있는 WCF 관련글들을 쭉 읽어보니 결국 인증 문제인것 같은데, 인증서로 인증부분을 처리해야 하나요?
김응규
2015-04-22 04시42분
security mode="None"으로 설정했기 때문에 인증 문제는 아닙니다. 인증서도 필요없을 것 같고요. 글쎄요... 그냥 봐서는 별다르게 문제가 없어 보이는데요. 단지, 에러 메시지에 보인 00:00:09.9945955 숫자가 걸리는데, 혹시 연결이 안되는 건가요? 아니면 연결은 되었는데 조금 있다가 끊기는 건가요?
정성태

... 31  32  33  34  35  36  37  38  39  40  41  42  [43]  44  45  ...
NoWriterDateCnt.TitleFile(s)
4773김상호11/4/201613438재귀함수 반복문 변환 [1]파일 다운로드1
4772자연인10/27/201614428hwpctrl을 사용하는 사이트에서 나와 브라우저를 종료하면 오류메세지가 나옵니다. [1]파일 다운로드1
4771문종훈10/18/201614464.net 소스 질문이 있습니다 [2]
4770누구게~...10/15/201611694세도나 [1]
4769spow...10/13/201610525올리시는 게시물에 '좋아요'를 선택할 수 있도록 해주세요 [3]
4768브라운10/11/201612258질문 하나만 드려도 될까요 [4]
4767암호군10/4/201616624c# aes 128 암복호화 관련 문의드립니다. [3]
4766김신철9/29/201611479Visual Studio 2015에서 .net 3.5로 c# 6.0 사용시 문제점에 대해서 궁금합니다. [1]
4765spow...9/23/201610899참조를 통해 속성의 값을 변경하고 싶을 때 우아한 코딩 방법이 있을까요? [2]
4764지현명9/22/201612443Visual Studio 2008 c#에서 추가된 솔류션의 디버깅이 안걸립니다. [2]파일 다운로드1
4763송기태9/20/201611214안녕하세요! 질문이 있어 문의드립니다! [1]파일 다운로드1
4762김신철9/20/201612346Visual Studio 2015 마이그레이션 후 빌드 및 에러 문제.. 도와주세요~ [2]
4761JH9/19/201612761WPF로 Viewbox 사용 시 폰트 크기 일정화 여부 [1]
4760초보9/18/201612700유닉스서버(HP)에서 C# 서버 프로그램 실행 가능 한지요? [1]
4759dev009/16/201613495Queue out of memory [3]
4758임기성9/12/201613068MS오피스 워드 64비트에서 32비트 COM개체 사용방법 문의 [2]
4757조영준9/7/201611101DLL 후킹과 관련해서 질문이 있습니다. [2]
4756Kim ...9/6/201613160drag&drop 관련해서 문의 드립니다. [6]
4755stel...9/4/201612004안녕하세요! 윈도우 창에 관련되서 질문입니다.! [3]
4754초보개발자8/25/201610894UWP 의 적용 범위에 대해서 어떻게 생각하십니까? [1]
4753조호찬8/23/201615767sybase 의 한글 가져오기 문의 [7]
4752타미플루8/19/201611381IIS 로그에서 time-taken이 0이 나올수 있나요? [4]
4751김민석8/16/201611571가변크기의 구조체를 SendMessage로 타 프로세스에 전송하는 방법이 있을까요? [1]
4750강준8/13/201613111ElementHost Memory Leak 현상 (아래내용과 동일 첨부 추가^^) [5]파일 다운로드1
4749강준8/11/201612124ElementHost Memory Leak 현상 [6]
4748Bere...8/3/201610980그냥 생각이 들어서 여기 글 써봅니다. [1]
... 31  32  33  34  35  36  37  38  39  40  41  42  [43]  44  45  ...