Using wsHttpBinding

Feb 23, 2010 at 7:49 PM

Dear Xcoordination Team,

Basically, I have two questions:

1) wsHttp Binding

I currently try to configure the AppSpace to use wsHttpBinding, using Message Security providing a X.509 Certificate on the Server side.
The certificate is used to setup message encryption only, not for any authentication. Authentication is switched off (clientCredentialType = "None").

However, beside all the certificate stuff, did you ever try to establish a wsHttpBinding with the XcoAppSpace? I would really be interested in a sample app.config showing your basic approach for this.

2) IIS hosting

Did you try to host an XcoAppSpace based server component in IIS?

Thanks and Greetings,

Claas

Coordinator
Feb 24, 2010 at 7:29 AM

Hello, Claas!

Unfortunately, the WSHttpBinding is currently not supported because our WCF transport service is session-oriented and it seems the WSHttpBinding doesn't support sessions.

But, I'm glad to inform you that we are currently working on this topic, and trying to figure out an easy way for hosting an XcoAppSpace within IIS (which of course includes comminucation with WSHttpBinding/BasicHttpBinding).

We will probably have a solution ready within the next weeks, I'll inform you as soon as we have something!

Best Regards
Thomas

Feb 24, 2010 at 9:17 AM

Hi Thomas!

Good to hear that it's not me alone struggling with the wsHttpBinding.. :-)  
I already figued out the session requirement. I think the wsHttpBinding is able to support sessions as long as security is in place. That is why I added my Cetificate to the server side (Not only for that reason of course, I also want some encryption.)

Basically, the following is my server side configuration: 

  <system.serviceModel>
    <services>
      <service name="XcoAppSpaces.Transport.WCF.SpacePortal" behaviorConfiguration="XcoBehavior">
        <endpoint name="XcoService" address="http://localhost"
          binding="wsHttpBinding" bindingConfiguration="XcoBinding"
          contract="XcoAppSpaces.Transport.WCF.IRemoteSpaceService" />
      </service>
    </services>

    <behaviors>
      <serviceBehaviors>
        <behavior  name="XcoBehavior">
          <serviceDebug includeExceptionDetailInFaults="true" />
          <serviceThrottling maxConcurrentSessions="10000" />
          <serviceCredentials>
            <serviceCertificate findValue="wsw.mydomain.com"
              storeLocation="LocalMachine" storeName="My"
              x509FindType="FindBySubjectName" />
          </serviceCredentials>
        </behavior>
      </serviceBehaviors>
    </behaviors>

    <bindings>
      <wsHttpBinding>
        <binding name="XcoBinding">
          <security mode="Message">
            <message clientCredentialType = "None" 
                     establishSecurityContext="true" />
          </security>
        </binding>
      </wsHttpBinding >      
    </bindings>
  </system.serviceModel>

Using this configuration, the server succeeds to start and to instantiate the AppSpace using the following constructor:

_as = new XcoAppSpace("wcf.port=8080");

So, using the Message based results in successfully creating the AppSpace. No exception regarding "..session support .." is thrown.

On the client side, I tried the following configuration:

  <system.serviceModel>
    <client>
      <endpoint name="XcoClient" address="http://localhost"
        binding="wsHttpBinding" bindingConfiguration="XcoBinding"
        contract="XcoAppSpaces.Transport.WCF.IRemoteSpaceService">
        <identity>
          <dns value = "www.mydomain.com" />
        </identity>
      </endpoint>
    </client>

    <bindings>
      <wsHttpBinding>
        <binding name="XcoBinding">
          <security mode="Message">
            <message clientCredentialType = "None"
                     establishSecurityContext="true" />
          </security>
        </binding>
      </wsHttpBinding >
    </bindings>
  </system.serviceModel>

As is with the server, also the client succeeds to instantiate its AppSpace:

_as = new XcoAppSpace("wcf.port=0");

But when connecting to a server-side worker, I get a NullReferenceException on the server side!

This made me thinking that maybe wsHttpBinding is not fully implemented in the AppSpace and this is why I asked you :-)

If there is anything I can try on my side to support you: let me know.

Best wishes,

Claas 

Feb 24, 2010 at 9:31 AM

uups, please change wsw.mydomain.com in www.mydomain.com  in the first listing..

Coordinator
Feb 24, 2010 at 4:13 PM

Hi!

Thanks for the hint, your are right. When adding security to the WCF configuration, the session mode is working. Unfortunately there seem to be some other details about the WCF transport service that keep it from working correctly with the WSHttpBinding still. We'll look into it.

Best Regards
Thomas

Mar 15, 2010 at 8:19 AM

Dear Thomas!

Any news regarding the wsHttpBinding support? 
Or let me ask a question the other way around: If wsHttpBinding is not supported, may be I simply start with netTcpBinding. However, I am struggling to get that running in an internet scenario. Do you have an example of client and server side configurations for the AppSpace that use netTcpBinding in an internet scenario, having a well known server, but multiple unknown clients connecting to it?

I will be happy to hear from you.

My best regards,

Claas