I have hit a wall and have been pulling my hair for quite some time now. Basically, I need to create a WCF service which would have ASP.NET Membership and Authorization providers, however it needs to allow the transfer of byte[] arrays or Stream objects and save them to Azure. The service itself is hosted on Azure.
The problem I have is that WCF wants message layer security for the exchange of client credentials. So i had the following config which works pretty well:
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="DefaultServiceBehavior">
<serviceMetadata httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceAuthorization principalPermissionMode="UseAspNetRoles" roleProviderName="SqlRoleProvider" />
<serviceCredentials>
<serviceCertificate x509FindType="FindBySubjectName" storeName="My" storeLocation="LocalMachine" findValue="SecureChannelCertificate" />
<userNameAuthentication userNamePasswordValidationMode="MembershipProvider" membershipProviderName="SqlMembershipProvider" />
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<wsHttpBinding>
<binding name="SecureBinding" messageEncoding="Mtom">
<security mode="Message">
<message clientCredentialType="UserName" negotiateServiceCredential="true" establishSecurityContext="true" />
</security>
</binding>
</wsHttpBinding>
</bindings>
</system.serviceModel>
So then the requirements changed and now I am required to push files to Azure via the WCF service. No matter what I do, WCF screams at me with all sorts of errors.
Does anyone know how to configure the service so that it can use authentication/authorization as well as Streaming?
Thanks!