Microsoft MVP성태의 닷넷 이야기
WCF net.tcp 관련해서 질문 드립니다. [링크 복사], [링크+제목 복사]
조회: 14755
글쓴 사람
김응규 (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 숫자가 걸리는데, 혹시 연결이 안되는 건가요? 아니면 연결은 되었는데 조금 있다가 끊기는 건가요?
정성태

1  2  3  4  5  [6]  7  8  9  10  11  12  13  14  15  ...
NoWriterDateCnt.TitleFile(s)
5805어웨이트1/25/20232985Taskcontinuewith vs Async/Await [2]파일 다운로드1
5804나이많은...1/25/20232845MS의 Dependency Injection(DI)에 AddSingleton으로 등록된 객체의 Event 등록후 사용시 앱 종료시 별도로 Event를 해지해야 하나요? [2]
5803dssc...1/24/20233081드라이브 문자를 통해서 물리 디스크 명칭을 알아내고 싶습니다. [1]
5802모바일앱1/22/20232960XAMARINE vs Android Studio [7]
5801블루투스1/19/20233696WPF 은행지폐계수기 개조 후 결과값 서버 전송 [2]파일 다운로드1
5800김민아1/19/20234025안녕하세요 가비지 컬렉터 동작 원리 중 궁금한점이 있습니다 [5]
5799guest1/19/20233175C# 공유폴더 내 Acess 디비 공유 [2]
5798kss1/19/20232953책 오탈인가요? [1]
5797이거비버1/19/20233046C# 공부 이후 MS 프레임워크.. 어느것을 공부해야할까요? 너무 많아서 정신이 없네요 [5]
5796guest1/19/20232763해킹 test [3]
5795동기1/18/20232607동기 스레드와 메서드와 While [2]
5794박규동1/18/20232575.net publish 할때마다 runtimeconfig 값이 바뀌는 현상 [1]
5793후후훗1/18/20232741.NET Core 에서 사용중인 함수 후킹 방법 [2]
5792Will...1/18/20232684소스코드 Log Write 기능을 리스트업 질문 [9]
5791PLC1/16/20233380C# - 실시간 5개 룸 모니터링 [15]
5790집으로 ...1/13/20233040[UI 멈춤 현상]deadlock 관련 글을 보고 혹시나 하고 문의 드립니다. [4]
5789guest1/10/20232937스레드와 Async Task [2]파일 다운로드1
5788kr11/10/20233387C# 에서 제공하는 컬렉션들의 차이점이 궁금합니다. [3]
5787stack1/10/20233175STACKOVERFLOW [1]
5786Dev ...1/9/20234042익명 클래스 말고 익명 구조체는 불가능한걸까요? [4]
5785음성인식1/8/20233642음성인식 System.Speech - 문법에 사용된 언어가 음성 인식기의 언어와 일치하지 않습니다. [2]
5784MS워드1/8/20233265MS워드에서 ctrl Z는 클립보드를 이용하나요? 아니면 참조자 이용하나요? [7]
5783구직자1/7/20233313C#개발자 구인광고와 초급개발자 [3]파일 다운로드1
5782Sqli...1/5/20233275윈도우11 노트북에서 exe(Sqlite)만들어 윈도우 7 PC에 설치 시 [5]
5781List맨1/5/20233780List.Add("newobj") 속도는 빠른 편인지요? [11]
5780임세1/3/20234397C# 프로그래밍 10 책 구매한 사람입니다. 3부 자료는 어디서 다운 받을 수 있나요? [4]
1  2  3  4  5  [6]  7  8  9  10  11  12  13  14  15  ...