Making a Silverlight WCF SOAP service secured with UserNameOverTransport work over HTTP for network architecture -


i have silverlight 4 application uses wcf soap service. authentication/authorization happens per call (quasi restful). done using authenticationmode=usernameovertransport - means that username/password in each wcf call, protected ssl encryption of each message. great thing scheme can configure membership provider in web.config authentication, making flexible different installations.

i have client set website on network scheme is: internet <= ssl traffic => external facing ssl enabled forwarding server <= unsecure http in internal network => server hosts application. assure me common architecture , believe them, not experienced internet application developer.

i not sure application set on ssl enabled server (usernamewithtransport on ssl). in plain http not sure how username need provide user specific application data. wcf not provide "usernamewithnotransport" authenticationmode mean sending username/password in plain text, silly. right server side code gets user servicesecuritycontext.current.primaryidentity.name, knowing web server has taken care of ssl encryption , user authentication. how can have work in way makes sense in http solution?

i solution allows me configure solution work in both http , https situation web.config, if not possible other advice appreciated. thanks

i place bounty on question in few days, if give answer before you'll it.

edit: here web config requested:

<?xml version="1.0"?> <configuration>   <configsections>     <section name="log4net" type="log4net.config.log4netconfigurationsectionhandler, log4net" />   </configsections>    <system.web>         <pages controlrenderingcompatibilityversion="4.0" clientidmode="autoid"/>     <membership defaultprovider="sampleprovider">       <providers>         <add name="sampleprovider" type="mynamespace.nullmembershipprovider, mydll"/>       </providers>     </membership>       </system.web>    <appsettings>     ...   </appsettings>    <system.servicemodel>     <servicehostingenvironment aspnetcompatibilityenabled="true" />     <bindings>       <custombinding>         <binding name="binarycustombinding" sendtimeout="00:10:00">           <security authenticationmode="usernameovertransport"/>           <binarymessageencoding />           <httpstransport maxbuffersize="100000" maxreceivedmessagesize="100000" />         </binding>       </custombinding>     </bindings>      <services>       <service name="mynamespace.myservice">         <endpoint                     binding="custombinding" bindingconfiguration="binarycustombinding"                     name="myservice" contract="mynamespace.iservicecontract" />       </service>     </services>      <behaviors>       <servicebehaviors>         <behavior name="">           <servicemetadata             httpsgetenabled="true"             httpgetenabled="false" />           <servicedebug includeexceptiondetailinfaults="true" />           <servicecredentials>             <usernameauthentication               usernamepasswordvalidationmode="membershipprovider"               membershipprovidername="sampleprovider"/>           </servicecredentials>         </behavior>       </servicebehaviors>     </behaviors>   </system.servicemodel>      <log4net> ...   </log4net> </configuration> 

allowing usernameovertransport on http possible in .net 4 think not possible in silverlight. need set allowinsecuretransport attribute of security element:

<custombinding>            <binding name="binarycustombinding" sendtimeout="00:10:00">                <security authenticationmode="usernameovertransport" allowinsecuretranposrt="true"/>                  <binarymessageencoding />                <httptransport maxbuffersize="100000" maxreceivedmessagesize="100000" />              </binding>        </custombinding> 

the problem allowinsecuretranposrt not available in silverlight. without can't use username token on unsecured channel.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -