Securing WCF service with forms authentication for use in silverlight with custombinding
I have a website (asp.net 4.0) that uses forms authentication, this site has a child site that hosts another site that hosts a silverlight application. The first site provides a login page and both sites share the same cookie name and machines keys allowing the login to be shared. This all works as we want it to. The fly in the ointment is that the silverlight application is trying to call WCF services that are hosted by the same website as it is in (i.e. the child site), but each call is failing. I'm always seeing a 302
response code that is trying to redirect the service call back to the login page.
My WCF service is using a binding like this:
<customBinding>
<binding name="SUV_MVVM.Web.Services.ExportHelper.customBinding0" >
<binaryMessageEncoding>
<readerQuotas maxStringContentLength="524288" />
</binaryMessageEncoding>
<httpTransport transferMode="StreamedResponse" />
</binding>
</customBinding>
and my silverlight app uses a binging that looks like this (set in ServiceReferences.ClientConfig
)
&l开发者_如何学Ct;customBinding>
<binding name="CustomBinding_IExportHelper_StreamedResponse">
<binaryMessageEncoding />
<httpTransport transferMode="StreamedResponse" />
</binding>
</customBinding>
I've read in a few places how to configure forms authentication for httpBindings, but I can't find anything that seems to apply to customBindings. How might I achieve this?
精彩评论