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

Post New Web Links

I want basicHttpBinding & wsHttpBinding togerther

Posted By:      Posted Date: October 27, 2010    Points: 0   Category :WCF

Hi all. I want to use a basicHttpBinding for transfer some files from WCF service to client.

And also I want a wsHttpBinding for check received username/password.

Please just think about this scenario.

What should I do? I wrote configure codes for basicHttpBinding and my service works.

Just say how can I add wsHttpBinding and use it?

(Please by code or a sample link)

Each problem has a solution.

View Complete Post

More Related Resource Links

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:)


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

WCF Service basicHttpBinding SmartDevice

Hello, i'm trying to use a WCF service in a SmartDevice project but i get the following message: "There was no endpoint listening at <URL> that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details." To connect to my WCF Service i used the NetCFSvcUtils.exe to generate the code to connect to the service, but i'm not sure if my binding is right, it's the first time that i develop for a smart device using a WCF Service. My binding code is:   <system.serviceModel> <services> <service behaviorConfiguration="WcfServiceCCM.ServiceCCMBehavior" name="WcfServiceCCM.ServiceCCM" > <endpoint address="" binding="basicHttpBinding" contract="WcfServiceCCM.IServiceCCM" bindingConfiguration="basicBindingConfig" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> </services> <bindings> <basicHttpBinding> <binding name="basicBindingConfig" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" maxBufferPoolSize="524288" /> </basicHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name=&qu

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

WSHttpBinding with out WS- securty?

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

basicHttpBinding configuration

I want to host WCF web service in my windows application. So far I succeeded with the following configuration: <system.serviceModel>     <bindings>       <wsHttpBinding>         <binding name="NewBinding0" />       </wsHttpBinding>     </bindings>     <services>       <service name="VegasWebServiceLibrary.VegasService" behaviorConfiguration="VegasWebServiceLibrary.Service1Behavior">         <host>           <baseAddresses>             <add baseAddress=""   />           </baseAddresses>         </host>         <!-- Service Endpoints -->         <!-- Unless fully qualified, address is relative to base address supplied above -->         <endpoint address=""  binding="wsHttpBinding" contract="VegasWebServiceLibrary.IVegasS

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 ???


InstanceContextMode.Single with basicHttpBinding



it is known that basicHttpBinding does not support sessions. However, when i configure a service as InstanceContextMode.Single and use basicHttpBinding it seems the service still creates only a single object although no session id is returned. please see the below example:

[ServiceBehavior(InstanceContextMode=InstanceContextMode.Single, ConcurrencyMode=ConcurrencyMode.Multiple)]
public class Service : IService

Guid guid = Guid.NewGuid();
public string GetData()

return guid.ToString() +";;;" + OperationContext.Current.SessionId;

now the client uses the following code:

Console.WriteLine("Client 1...");
using (ServiceReference1.ServiceClient proxy = new ServiceReference1.ServiceClient("BasicHttpBinding_IService"))
Console.WriteLine("Client 2...");

using (ServiceReference1.ServiceClient proxy2 = new ServiceReference1.ServiceClient("BasicHttpBinding_IService"))

 the output in the Console is as follows:<

Problem with WCF using basichttpbinding over https


I am having a tough time to access the WCF service thru basichttpbinding over https.

I have tried everything but this is the only error I get "There was no endpoint listening at"

Sometimes it gave some certificate error, I tried to suppress it using some code after googling. I am using self signed certificate in IIS 7.0.

This is for .net 4.0, VS 2010 on Windows 7

This is the configuration

      <service name="Service" behaviorConfiguration="ServiceBehavior">
        <!-- Service Endpoints -->
        <endpoint address="http://localhost/SuretyService/SuretyService.svc" binding="basicHttpBinding" contract="SuretyServices.ISuretyService"  bindingConfiguration="webBinding">
            <dns value="localhost"/>
        <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange"/>
        <binding name="webBinding">
          <security mode="Transport">

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.



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