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

  • Home
  • SEARCH
  • 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 80215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:16:03+00:00 2026-05-10T21:16:03+00:00

Sorry answer found while typing I am trying to connect to an external webservice

  • 0

Sorry answer found while typing

I am trying to connect to an external webservice that requires username/password authentication through a proxy. I am using Visual Studio Express 2008 to generate a service reference

  • I have connected to the same webservice using a web reference.We only had to set a larger timeout because it takes a long time to finish.
  • I have connected to another webservice that does not require username/password authentication with a generated service reference and some settings to get it through the proxy.

So my thought would be to take this reference, point it to the correct webservice and add authentication.

The config I am using without security:

    <?xml version='1.0' encoding='utf-8' ?>     <configuration>       <system.net>         <defaultProxy useDefaultCredentials='true'>           <proxy bypassonlocal='False' proxyaddress='http://***.***.****:80' />         </defaultProxy>       </system.net>         <system.serviceModel>           <bindings>             <customBinding>               <binding name='AreaWebServiceSoap12'>                 <textMessageEncoding maxReadPoolSize='64' maxWritePoolSize='16'                     messageVersion='Soap12' writeEncoding='utf-8'>                   <readerQuotas maxDepth='32' maxStringContentLength='8192' maxArrayLength='16384'                       maxBytesPerRead='4096' maxNameTableCharCount='16384' />                 </textMessageEncoding>                             <httpTransport manualAddressing='false' maxBufferPoolSize='524288'                     maxReceivedMessageSize='65536' allowCookies='false' authenticationScheme='Anonymous'                     bypassProxyOnLocal='false' hostNameComparisonMode='StrongWildcard'                     keepAliveEnabled='true' maxBufferSize='65536' proxyAuthenticationScheme='Anonymous'                     realm='' transferMode='Buffered' unsafeConnectionNtlmAuthentication='false'                     useDefaultWebProxy='true' />                           </binding>             </customBinding>           </bindings>           <client>             <endpoint address='http://www.****.*****.****.com/samplewebservice/service.asmx'                     binding='customBinding' bindingConfiguration='AreaWebServiceSoap12'                     contract='ServiceReference1.ServiceSoap' name='ServiceSoap' />             </client>         </system.serviceModel>     </configuration> 

I have added te following code to my call for authentication:

static void Main(string[] args) {   ServiceSoapClient s = new ServiceSoapClient();   s.ClientCredentials.UserName.UserName = @'username';   s.ClientCredentials.UserName.Password = @'password';    Service.RawGpsData[] result = s.GetRawGpsData(0);   Console.WriteLine(String.Format('done:{0}',result.Length));   Console.ReadLine(); } 

Just using this setup gives an error as expected:

The HTTP request is not authorized with client authentication scheme Anonymous. The authentication header from the server is received, is NTLM.

Now I get lost and start trying silly things because I am just starting to use WCF.

When I add the following section to the config

 <security authenticationMode='UserNameOverTransport'></security> 

I get the following error:

The binding CustomBinding.http: / / tempuri.org / for the contract AreaWebServiceSoap.AreaWebServices is configured with a verification mode for which a transport level with integrity and confidentiality is required. The transport can not provide integrity and confidentiality.

Sorry, while typing this question I stumbled upon the answer myself. I still think people might be interested in this and all comments and thoughts are still welcome. So I will leave the question here and make it community and post the answer myself.

  • 1 1 Answer
  • 1 View
  • 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. 2026-05-10T21:16:04+00:00Added an answer on May 10, 2026 at 9:16 pm

    Change the binding to :

    <?xml version='1.0' encoding='utf-8' ?> <customBinding>             <binding name='AreaWebServiceSoap12' closeTimeout='00:01:00' openTimeout='00:10:00'                     receiveTimeout='00:20:00' sendTimeout='00:05:00'>                 <textMessageEncoding maxReadPoolSize='64' maxWritePoolSize='16'                   messageVersion='Soap12' writeEncoding='utf-8'>                 <readerQuotas maxDepth='32' maxStringContentLength='8192' maxArrayLength='16384'                     maxBytesPerRead='4096' maxNameTableCharCount='16384' />               </textMessageEncoding>                             <httpTransport manualAddressing='false' maxBufferPoolSize='524288'                     maxReceivedMessageSize='65536' allowCookies='false' authenticationScheme='Ntlm'                   bypassProxyOnLocal='false' hostNameComparisonMode='StrongWildcard'                   keepAliveEnabled='true' maxBufferSize='65536' proxyAuthenticationScheme='Anonymous'                   realm='' transferMode='Buffered' unsafeConnectionNtlmAuthentication='false'                   useDefaultWebProxy='true' />                           </binding>           </customBinding> 

    So set authenticationScheme=’Ntlm’

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

Sidebar

Ask A Question

Stats

  • Questions 127k
  • Answers 127k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer In general, C++ needs typename because of the unfortunate syntax… May 12, 2026 at 5:35 am
  • Editorial Team
    Editorial Team added an answer I think I just needed to sleep :) this is… May 12, 2026 at 5:35 am
  • Editorial Team
    Editorial Team added an answer Absolutely! Just call Read(...) on the stream. That will block… May 12, 2026 at 5:34 am

Related Questions

We are currently using VSS for version control. Quite few of our developers are
We have a button that saves asynchronously using AjaxToolKit/C#/.NET. I'm getting this in my
I am working on a function to establish the entropy of a distribution. It
I am sorry if the post is too long, but I would be happy

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.