locked
Forms Authentication and WCF RRS feed

  • Question

  • I have a WCF service hosted in a website using IIS. The website is secured with Forms Authentication. I want to be able to access the username and httpcontext in the wcf (this will be for Silverlight but I'd like to be used in ASP.net pages calling the WCF as well).

    The authentication cookie does not seem to be being passed to the wcf service. I have looked in Fiddler - and there is an encrypted cookie which is the name of the application on the asp.net page requests but not the WCF requests.

    I have a feeling I am doing something stupid:

    In order to get my service reference working I allow it through FBA like this:

     <location path="testsl.svc">
      <system.web>
       <authorization>
        <allow users="*"/>
       </authorization>
      </system.web>
     </location>

    Could this be causing Asp.net not to pass the authentication cookie.

    I have tried enabling cookiecontainers in my silverlight container but I'm just guessing

    Any ideas? Cheers, Chris. Totally stuck.

     

     


    Chris
    Tuesday, May 24, 2011 11:34 AM

Answers