Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9224975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:27:47+00:00 2026-06-18T04:27:47+00:00

please help me. I create service whith netTcpBinding and security mode=Message message clientCredentialType=UserName ,

  • 0

please help me. I create service whith netTcpBinding and security mode="Message" message clientCredentialType="UserName", this is my config

  <system.serviceModel>
<client>
  <endpoint address="http://topaznet.hq.eximb.com/RS/Svc/RS.svc"
    binding="wsHttpBinding" bindingConfiguration="wsHttpBindingEndpoint"
    contract="RSClient.IRS" name="wsHttpBindingEndpoint" />
</client>
<services>
  <service behaviorConfiguration="CredoServiceBehavior" name="CredoService.Credo">
    <endpoint address="" binding="netTcpBinding" name="netTcpBindingEndpoint"
      contract="CredoService.ICredo" />
    <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" contract="IMetadataExchange" endpointConfiguration="" />
    <host>
      <baseAddresses>
        <add baseAddress="net.tcp://localhost/CredoService/" />
      </baseAddresses>
    </host>
  </service>
</services>

<bindings>
  <netTcpBinding>
    <binding name="netTcpBinding" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
      <security mode="Message">
        <message clientCredentialType="UserName"/>
      </security>
    </binding>
  </netTcpBinding>
  </bindings>
<behaviors>
  <serviceBehaviors>
    <behavior name="CredoServiceBehavior">
      <serviceCredentials>
        <userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="CredoService.Common.CustomUserNameValidator, CredoService"/>
        <serviceCertificate storeLocation="LocalMachine" storeName="My" x509FindType="FindByThumbprint" findValue="91797E67B20D0853A90CA8E228AF460A382ED94B" />
        <windowsAuthentication allowAnonymousLogons="true"/>
      </serviceCredentials>
      <serviceMetadata httpGetEnabled="true"/>
      <serviceDebug includeExceptionDetailInFaults="true"/>
      <serviceThrottling maxConcurrentCalls="2147483647" maxConcurrentSessions="2147483647" maxConcurrentInstances="2147483647"/>
      <dataContractSerializer maxItemsInObjectGraph="2147483647" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />

Service hosted in IIS and work fine.
I create new windows forms project and click Add Service Reference, visual studio genetate for my config :

    <system.serviceModel>
    <bindings>
        <netTcpBinding>
            <binding name="netTcpBindingEndpoint1" closeTimeout="00:01: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="65536" maxConnections="10"
                maxReceivedMessageSize="65536">
                <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://localhost/CredoService/Credo.svc"
            binding="netTcpBinding" bindingConfiguration="netTcpBindingEndpoint"
            contract="CredoClient.ICredo" name="netTcpBindingEndpoint">
            <identity>
                <servicePrincipalName value="host/home" />
            </identity>
        </endpoint>
    </client>
</system.serviceModel>

In this web config:

                    <security mode="Transport">
                    <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
                    <message clientCredentialType="Windows" />
                </security>

but in my service

  <security mode="Message">
    <message clientCredentialType="UserName"/>
  </security>

if i change this client dont work and throw exception.
How can i fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T04:27:48+00:00Added an answer on June 18, 2026 at 4:27 am

    I just spotted another issue with your code. Your service isn’t picking the binding!

    <endpoint address="" binding="netTcpBinding" name="netTcpBindingEndpoint"
      contract="CredoService.ICredo" />
    

    needs to be

    <endpoint address="" binding="netTcpBinding" bindingConfiguration="netTcpBinding" name="netTcpBindingEndpoint" contract="CredoService.ICredo" />
    

    in your <services><service><endpoint> section.

    That would explain why VS is going with default NetTcpBinding instead of your options.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first android project so please help I am trying to create
Please help me out for the below mentioned scenario.... applicationContext-security.xml <authentication-manager> <authentication-provider> <jdbc-user-service data-source-ref=dataSource
Please help me create my own custom layout, container, component, layout manager... Example: Containers
Please help me with using the DrScheme built-in function filter. create a function hello
Please help me finding where I have made mistake? delimiter // CREATE FUNCTION `count_photos_in_gallery`(`tmp_gallery_id`
can someone please help me out? I'm trying to create an input dynamically with
I need some help to get this right, please. I have created an iPad
Please help me somebody to convert unicodestring into string This is how i am
Please help me with this update query. I COMPLETELY understand how redundant this is
Please help me, as I will go mad with this soon: When I run

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.