.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

WSHttpBinding with out WS- securty?

Posted By:      Posted Date: September 04, 2010    Points: 0   Category :WCF
Hey!Is it posible to use WSHttpBinding without the WS-security?The Config could look like this:            <wsHttpBinding>                <binding name="Binding1"    hostNameComparisonMode="StrongWildcard"    receiveTimeout="00:10:00"    sendTimeout="00:10:00"    openTimeout="00:10:00"    closeTimeout="00:10:00"    maxReceivedMessageSize="131072"    maxBufferPoolSize="1048576"    messageEncoding="Text"    textEncoding="utf-8"    bypassProxyOnLocal="false"    useDefaultWebProxy="true" >                    <security mode="Message">                        <transport clientCredentialType="None"/>                    </security>                    <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />                </binding>            </wsHttpBinding>But if we change the security mode to the fallowing:            <wsHttpBinding>                <binding name="Binding1"    hostNameComparisonMode="StrongWildcard"    receiveTimeout="00:10:00"    sendTimeout="00:10:00"    openTimeout="00:1

View Complete Post

More Related Resource Links

WCF with wsHttpBinding and x509 Certificate - can I use VB/C# to connect with PHP?

We connect to a web service hosted by another company.  We send a customer's basic info to the service, and replies with rates/prices for that customer. I am a PHP guy -- started out playing with basic HTML, then delved into PHP about 8 years ago, and my entire web app is PHP with javascrtipt/ajax mixed in as needed.  I'm a learn-as-I-go guy. For the last two years, the service has been an aspx web service, which was easy -- just connect with PHP's SoapClient.  Now, the company hosting the service has changed it to WCF, and the binding is wsHttpBinding, and authentication is done via x509 certification. I've determined that PHP's SoapClient can't handle wsHttpBinding.  So my first roadblack - how the heck do I connect to this service?  I went as far as to install MS Visual Web Developer 2010 Express, and then I used svcutil.exe to create .config and .cs files for the service.  But understand, I've never written anything in C# or VB.  I've done a few little VBScripts in the past, and I can handle javascript... but I'm looking at these .config and .cs files and thinking, now what the heck do I do with these?? Basically, I just want to connect to this service using PHP and javascript.  But since it seems that's impossible (correct?), is there a way I can invoke a VB/C# operation from within my PHP script?  For ins

Is BasicHttpBinding/WSHttpBinding + Windows Authentication + Message Security possible without serve


Hi Folks,

I need to deploy a WCF service hosted in IIS 7.5 which has the following constrains:

1) Using Windows Authentication
2) No server or client certificate is needed
3) Using either BasicHttpBinding or WSHttpBinding
4) Using Message Security, so that it is not possible to monitor the communication maliciously. (I think Transport Security is not possible without server certificate)

Is it possible to fullfil the above requirements simultaneously? Thanks for the reply in advance. I'll appreciate it:)


WsHttpBinding over Https



I have created wcf web service with wsHttpBinding with certificate, when i install it on client machine i accept the following exception :

[ServiceActivationException: The service cannot be activated due to an exception during compilation.  The exception message is: Could not find a base address that matches scheme http for the endpoint with binding WSHttpBinding. Registered base address schemes are [https]..]


WCF with WSHttpBinding on NetScalar - Security negotiation Issue.


Hi Gurus,


We have a WCF Service with *wsHttpBinding* and consumed by our windows application. This application consumes other services (asmx) too.


In Production we deployed this WCF Service on 3 machines. Service is working perfectly when under software NLB for load balancing.


Recently, our production environment has changed the Load balancing technique with *Citrix NetScalar* for VMs.

wsHttpBinding with Windows Authentication and Message Security



I want to accomplish wsHttpBinding with Windows Authentication and Message Security. I've created a test service and deployed on Windows Server 2008 and IIS 7.5.

The virtual directory has been assigned a application pool running under custom account domain\username. Only
Windows Authentication is enabled on the virtual directory ( i DONT want anonymous access enabled).

I keep getting this error "Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service."

Below is my server config file. I've followed  instructions at http://msdn.microsoft.com/en-us/library/ff650619.aspx

        <binding name="NewBinding0">
          <security mode="Message">
            <transport clientCredentialType="Windows"></transport>

WsHttpBinding Windows credential


hi there.

i have a WCF service hosted in IIS, using the WsHttpBinding,
i use a WinForm client to use that service.
i created a new user on the machine running the WCF service (i'll use this user to authenticate my client when invoking the WCF service).

as i red, the WsHttpBinding comes by default with
  Security mode on 'Message'
  Credentialtype on 'Windows'

when i start my client (winfrom) in  a machine in the same domain where the WCF is hosted, every thing is goning fine.
but if my client is outside the domaine where my WCF is installed, i got an exception :

    ex.Message = An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.
    ex.InnerException.Message = an error occured when veryfing security for message.

is it correct that with Windows credential type, the client must be in the same domain ???


Problems with changing a SharePoint hosted WCF Application from BasicHttpBinding to WSHttpBinding



I have deployed a WCF Application/Service to a SharePoint Solution by using the walk-throgh described in this article http://www.sharepointbits.com/blog/custom-wcf-services-in-sharepoint-2010.html

My Webservice will be talking with TFS2010 and therefore I need to change the Binding to WSHttpBinding. I have tried to modify the web.config without any luck...

 Any help would be appretiated

<!-- Modified for TFS Services-->
			 <behavior name="TFSServiceBehavior">
     <serviceMetadata httpGetEnabled

WshttpBinding Problem..?


hi there i'm new 2 WCF,

i'm using my wsHttpBinding in my web app

and i've hosted that app to my staging server.

when i make a first request everything works fine

and in few steps it randomly it throws an timeout exception.

my data is not much heavy but still a problem.

Note : -

i havent made any changes in the binding part.

i'm using the default markup generated by asp.net.

next thing everything works fine. if i change my wsHttpBinding to basicHttpBinding.

No timeout exception. no random error. all cool.

can somebody tell me please wot am i missing in wsHttpBinding..?

Timeout Problem with wsHttpBinding

Okey i have created a Wcf Service which is using the wsHTTPBinding..
when i invoke the service for the very first time it works fine...when i access from client..
but later after 2 or 3 hits it gives me the Timeout Exception..
any ideas how to fix that..?
to fix that i've used the basicHTTPBinding instead of using wsHTTPbinding
and it works fine..no timeout problems..all cool...but i'm not happy with the basicHTTPBinding..
i want to use wsHTTPBinding...so can someone tell me is there any settings
to resolve this problem..

How to setup WCF with wsHttpBinding, Transport Security with x509 certificate behind a load balancer


I'm having a difficult time setting up this WCF Service with wsHttpBinding, Transport Security, x509 and, the key part, the Load Balancer (F5). This all works without a problem in our Dev environment but as soon as I put it behind the F5 it fails giving me this message:

System.ServiceModel.Security.SecurityNegotiationException: Could not establish trust relationship for the SSL/TLS secure channel with authority 'servicechannelcert'. ---> System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.

Is there any additional setup I need to do in IIS or the Load Balancer to handle these requests?

configuration files:

<binding name="wsHttpTransport">
 <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
  maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
 <security mode="Transport&

ws-transaction with wsHttpBinding


Hi all,

I have created a service which uses transaction.I have configured it to use wsHttpBinding and hosted in the IIS.I also have a client which speaks to the server.My doubt here is,if I use wsHttpBinding it in turn defaultly supports only wsAtomicTransaction.I read some where if you use wsAtomicTransaction you need to use wsatconfig.exe.I haven't used that but the client runs for me fine?

whether what I did is correct?

Any one have any idea please respond.

one more doubt is, I configured the service to use the "ReadCommitted" isolation level with wsHttpBinding.When I called the service in the client is throwed error saying "Recieved transaction has isolation level of "serializable" but the srevice is configured with the transaction isolation level of "Read Committed".Transaction level of the received transaction and the service must be same".

Is the ws-Transaction by default supports only transaction isolation scope of serializable?

could any one please help me?



Can i make my wsHttpBinding to be compatible to SOAP1.1 protocol



I have a WCF service written which has a wsHttpBinding. Now i want this binding to use SOAP 1.1 protocol.

Can i achieve this by any means.

Thanks in advance.



Is wsHttpBinding supports Restful services in WCF ?



One my architect in our company said that we can create Restful services using wsHttpBinding. Up to my knowledge i know only webHttpBinding is supports Restful services in WCF.

Is my architect was correct ? if yes,I need to know is any other process to make Restful services using wsHttpBinding.

Thanks in advance.........


Need HELP to convert congfig section from WsHttpBinding to BinaryHttpBinding


I have a WCF which use WSHttpBinding. In order to take advantage of binary serialization without writing a single line of code, I am trying to replace my current WsHttpBinding with BinaryHttpBinding. The config section I have right now is as below. How would I convert it to config mentioned at bottom?  I mean can I just simply add current config details like sendTimeout or reliableSession to custom binding also?


My current binding config for WCF:  

                <binding name="WSHttpBinding_SupplyChainService" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Mtom" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
                    <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength=&

Returning a DataTable as List in WCF with WsHttpBinding

  • Would it be better in terms of payload, if I return a datatable as a List<DataRow> from a WCF method? I have WsHtppBinding for my WCF. I am expecting the datatable to contain 5,000 to 10,000 records.
  • Also, how can I test the difference in payload sizes when returning a DataTable Vs List<DataRow>?


WsHttpBinding: No FaultException for http status code 400 (for 500 everything works fine)


A .NET client consumes web services using Soap 1.2 via WCF. The services generate SOAP errors with http status code 400 and body containing SOAP fault code as well as subcodes. The client side exception that is thrown only contains InnerException = {"The remote server returned an error: (400) Bad Request."} without ability to access SOAP error code information.

For http status code 500 type of errors everything works fine by raising a FaultException with information.

Is there any flag to get it working for http status code 400 as well?

WCF Service to serve both wsHttpBinding and pollingDuplexHttpBinding



I am working on a WCF service which orginally supports Silverlight 4 clients using pollingDuplexHttpBinding - it worked quite well. My group is looking to expand this service to serve dot Net 4 clients aswell using wsHttpBinding. This was the first WCF service my group has created, so we are looking for some guidance, das anyone tried this before? Can anyone provide an example or recommendations of how to implment this on the WCF service so that it can serve both silverlight and dot net clients?

Thanks, any help is appreciated!


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend