Change basicHttpBinding to wsHttpBinding in azure cloud service web role

So I created a cloud service project in visual studio and added wcf service web role to cloud service.

By default wcf service web role binding is set to basicHttpBinding.

Currently my web.config looks like this:

<?xml version="1.0"?>
<configuration>
  <system.diagnostics>
    <trace>
      <listeners>
        <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
          name="AzureDiagnostics">
          <filter type="" />
        </add>
      </listeners>
    </trace>
  </system.diagnostics>
  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, set the value below to false before deployment -->
          <serviceMetadata httpGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
    <directoryBrowse enabled="true"/>
  </system.webServer>

</configuration>

How do I change my config to use wsHttpBinding?

September 13th, 2013 6:40am

Hi,

Please refer to http://msdn.microsoft.com/en-us/library/ms733099.aspx. From my experience, in Windows Azure, we cannot use Windows authentication (the default configuration for WSHttpBinding), unless we use WAAD and let the cloud server join the local domian. So it is needed to turn off authentication, or use an alternative authentication mechanism (such as username and password).

Best Regards,

Ming Xu

Free Windows Admin Tool Kit Click here and download it now
September 16th, 2013 12:32am

Creating WCF service over wshttpbinding is possible with Message security. Here are the details about step by step guide to create WCF service over http and wshttpbinding using custom username ad password validator -

http://sanganakauthority.blogspot.in/2014/03/azure-wcf-web-role-with-wshttpbinding.html

Hope this helps.

March 8th, 2014 4:10pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics