rkaiser
  • Posts: 3
  • Joined: 04/06/2009
Hello,

i want to integrate YAF with my application.

However YAF will be installed as different application on a different web server, the database server is shared (both applications use the same database server but may be hosted on different web servers). Bothe applications are sharing the user data (i can login in the forum with the userdata from my app, that already works nice)

Now i will allow the user to login into my application, click on a link and be redirected to the YAF installation. On the YAF installation the user should be authenticated.

I tried the various ways described for the integration but none of them seems to work if the application and the forum are different applications.

My idea was to set a cookie before redirecting to the forum and modify the forum source to auto-login the user if that cookie is detected. The problem is that i have no idea where to modify the forum source.

What is the best place to implement such an auto login in YAF (Page_Load in the main user control?)

Any hints?

Thanks in advance,
Ralf
Sponsor
jshepler
  • Posts: 189
  • Joined: 09/08/2008
Authentication is already "remembered" using cookies. The problem is cookies are tied to the site that wrote them. Since you have yaf on a different site, it won't get the authentication cookie set from the other site. There's nothing you can do about it. It's not a yaf or coding thing, it's how cookies work.

not jsheLPer
rkaiser
  • Posts: 3
  • Joined: 04/06/2009
I just wanted to know where is the best place to implement an auto-logon?

The plan is to submit a paraneter (ok, cookies are not working in that scenario, i forgot) that contains the user name to the forum. If that parameter is present the forum would set the auth cookie and redirect to the start page. That should work to authenticate the user, right?

But where do i have to modify the source (in Page_Load of the forum.ascx? or would it be better to do that in the code behind of default.aspx - which has to be created?)

Thanks in advance,
Ralf
jshepler
  • Posts: 189
  • Joined: 09/08/2008
global.asax
not jsheLPer
rkaiser
  • Posts: 3
  • Joined: 04/06/2009
Thanks very much!

Works really great.
Forum Jump  
  • You cannot post new topics in this forum.
  • You cannot reply to topics in this forum.
  • You cannot delete your posts in this forum.
  • You cannot edit your posts in this forum.
  • You cannot create polls in this forum.
  • You cannot vote in polls in this forum.

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved