0

I have a couple of questions regarding security mechanisms in asp.net (2.0).

I have always been using Forms authentication + Page.User for validating permissions.

Now I need to send some data from client side javaScript (jQuery) to a WCF service. Will my IPrincipal be still accessible from HttpContext of WCF service (I'm hosting my services on same IIS, same domain).

I'm particulary interested if $.Ajax will grab client authentication cookie and assign it to HttpContext on the server (or does it happen automagically)?

What are possible gotchas / pitfalls here?

Thank you.

1
  • I'm not quite sure I understand. Are you trying to login using WCF or just perform a priviledged operation via WCF? Commented Apr 3, 2009 at 12:48

1 Answer 1

2

You can, but need to set this property in web.config of your WCF service.

<system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
</system.serviceModel>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.