tags:

views:

3489

answers:

1

Hi All,

I'm going to be very vague here so I apologise In advance.

I am very new to WCF and I have created a service to be consumed via a windows mobile app using the basicHttpBinding. I am now looking at how to implement encrpytion and authenticaion and I am not getting very far.

I have added the following to my server side service configuration (which I believe is correct):

  <basicHttpBinding>
    <binding name="SecurityByTransport">
      <security mode="TransportWithMessageCredential">
        <message clientCredentialType="UserName" />
        <transport clientCredentialType="Certificate" />
      </security>
    </binding>
  </basicHttpBinding>

Now after installing a temporary certificate on my IIS instance I can navigate to my service via https.

At this point I used visual studios built in tool for running svcutil.exe and generated my proxy, which connects just fine.

The issue I have is in the client config, in that the endpoint reference is using http and not https. If I change this I get the following error:

The provided URI scheme 'https' is invalid; expected 'http'.

Which obviously I do not want.

Also in my client config the security specified seems to be "None", is this right?

Any help would be appreciated.

Cheers, Chris.

+3  A: 

Have a look at this article.

Perpetualcoder
I used the article and it works, but in the "To test this service, ... the following syntax" line it show the wrong url (it's a https url, but not the hostheader I'm filtering and not the hostheader the certificate is created for). How do I manipulate this URL?
Hinek