3

We have a site built using Forms based authenication in .NET, is there any way of accessing these sessions / user variables and roles in a PHP application?

1 Answer 1

3

You need to create an own ASP.NET Session State handler, that can store session data in a way that can be understood by both platforms.

like this: http://www.exforsys.com/tutorials/asp.net-2.0/asp.net-2.0-customizing-the-session-state-mechanism.html

The data could be stored for example in a mysql database, and .net should create a unique session cookie, witch can easily grabbed by php. If php gets the the cookie, it can read the session data from the database. But this will only work under the same domain (because of the cookies)

So if you work under multiple domains, the first step is in every case the same, but, instead of using cookies, you need to give the session id to the other page trough for e.g. the url.

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.