Combining ASP.NET and PHP

StPatrick

Perch
Hiya, I believe this is not a trivial question, but maybe I'm wrong :)

Let's say..
I have an ASP.NET site, but at same time I want to incorporate some PHP forum into it (phpbb for example). Of course I want them to "share" the same session, not technically, but visually for user. User should login only once, for example on ASP.NET login form, and then he/she will be logged on in PHP forum as well.
Anyone have thoughts, suggestions or maybe done this before? Of course, if I won't find an answer, I'll just go and use the same forum I have on my own site, but it less powerful, than phpbb one (as an example).
 
Hi,

I don't think you'll be able to share sessions. Even ASP and ASP.NET are incompatible. It's easy to create a site that uses both platforms, but if you try to access a session variable created in ASP.NET using ASP, it won't work. I think the reason is that they are different server processes.

The best you'd be able to do is pass some paramaters across on the URL so that the user doesn't have to log in again. You wouldn't want to pas username and password, but perhaps you could pass username and a unique id generated when they logged into the first site. Store that unique id against the user in a database table and then check it from the 2nd site to make sure it matches the username. If it does, you can log them in automatically.

Then of course you've got the problem of modifying phpBB to read those paramaters and log in automatically. Shouldn't be too hard if you're experienced...but if not you may have some trouble.

Hope that helps.

Regards,
Cameron
 
Yes I know I can't access session from other languages/platforms, that what I meant - some kind of workaround.
But probably I will just use ASP.NET forums and add the features I need to them, instead trying to syncronize 2 sessions.
 
Re: Re: Combining ASP.NET and PHP

StPatrick said:
Yes I know I can't access session from other languages/platforms, that what I meant - some kind of workaround.
But probably I will just use ASP.NET forums and add the features I need to them, instead trying to syncronize 2 sessions.

Not sure if this is a stupid suggestion but what about cookies? They are platform independent.

Not sure if you can use a cookie for the forum software as validation but if so...then a cookie would work.
 
Re: Re: Re: Combining ASP.NET and PHP

No, not "stupid" at all :) Well right, this could work if I'll modify the forum's code some
 
Back
Top