Click here to Skip to main content
15,887,875 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hello
I try to make my first wcf service
It works very good in a lan but when i try to call it throw the internet i get the error tcp 10061 the pc i try to run the service is behind a cisco dsl router and i have configured the router to send all incoming trafic from port 49999 to 192.168.16.2:49999 it works i had another app non wcf and it had worked
can somebody help me
the app.config is following
thanks a lot
server:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.web>
    <compilation debug="true" />
  </system.web>
  <!-- When deploying the service library project, the content of the config file must be added to the host's 
  app.config file. System.Configuration does not support config files for libraries. -->
  <system.serviceModel>
    <services>
      <service behaviorConfiguration="Top_Sales_Server.salesserviceBehavior"
        name="Top_Sales_Server_library.TopActions">
        <endpoint address="" binding="netTcpBinding" bindingConfiguration=""
          contract="Top_Sales_Server_library.TopIActions">
         </endpoint>
        <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
          contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="net.tcp://0.0.0.0:49999/Top_Sales_Server" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="Top_Sales_Server.salesserviceBehavior">
          <serviceMetadata httpGetEnabled="false" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>


client

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.diagnostics>
    <sources>
      
      <source name="DefaultSource" switchName="DefaultSwitch">
        <listeners>
          <add name="FileLog"/>
         
        </listeners>
      </source>
    </sources>
    <switches>
      <add name="DefaultSwitch" value="Information" />
    </switches>
    <sharedListeners>
      <add name="FileLog"
           type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
           initializeData="FileLogWriter"/>
      </sharedListeners>
  </system.diagnostics>
  <system.serviceModel>
    <bindings>
      <netTcpBinding>
        <binding name="NetTcpBinding_TopIActions" closeTimeout="00:10:00"
            openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
            transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
            hostNameComparisonMode="StrongWildcard" listenBacklog="10"
            maxBufferPoolSize="524288" maxBufferSize="16777216" maxConnections="10"
            maxReceivedMessageSize="16777216">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
              maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <reliableSession ordered="true" inactivityTimeout="00:10:00"
              enabled="false" />
          <security mode="Transport">
            <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
            <message clientCredentialType="Windows" />
          </security>
        </binding>
      </netTcpBinding>
    </bindings>
    <client>
      <endpoint address="net.tcp://*.*.*.*:49999/Top_Sales_Server"
          binding="netTcpBinding" bindingConfiguration="NetTcpBinding_TopIActions"
          contract="ServiceReference1.TopIActions" name="NetTcpBinding_TopIActions">
            </endpoint>
    </client>
  </system.serviceModel>
</configuration>
Posted

1 solution

after a lot of search i founded that i have to authorize me in the domain befor i can communicate with the wcf service
so i haded to sent the domainname, username and password
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900