aboovk
  • Posts: 4
  • Joined: 07/03/2008
Hi,

I have a website with a login module.
When a user register with my website, i am creating required records in YAF tables too.
But now i am trying to make a single signup for both my website and for the YAF.
If a user login to the web by using my login page, he should be able to post messages to YAF without login again though the YAF login interface.

Can somebody help on this?

Thanks in advance.
Sponsor
Ederon
  • Posts: 902
  • Joined: 07/01/2007
You just need to use same authentication cookie for both application, it's even easier if both your site and forum runs under one. All you need is to make <authentication> tag in web.config common for both.
When I post FP:Ederon in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting.
UserPostedImage 
aboovk
  • Posts: 4
  • Joined: 07/03/2008
Thanks for your reply.

I will try this option.

Aboo
guest
  • #4
  •  guest
  • Rank: Guest
  • Posts: 448
  • Joined: 18/03/2003
I found this article on this topic:

http://www.developer-cor...rticleId/23/Default.aspx 

however, it assumes a lot about the patterns used in the application and does not solve many other integration problems required for a deep integration between YAF and another application context. I am currently working on this problem and don't yet have a coherent solution.

My requirements and constraints are the following:

1. I have my own session objects managing authentication and state.
2. I have my own security.
3. SSO is a small part of creating a coherent user experience between two hosted applications. I don't want duplicate user management nor synchnronization issues with security meta-data.

I don't have any answers at the moment, but I will post some of my findings as I work through my solution. I will be reviewing YAF authentication sequences to see what the implementation is and then decide from there.

CCB
aboovk
  • Posts: 4
  • Joined: 07/03/2008
May be this is useful.

In my custom login handler I have inserted the following code to populate the YAF session values.

//to populate yaf session
try{
//compute the MD5 password
string sPassword = FormsAuthentication.HashPasswordForStoringInConfigFile(txt_password.Text, "md5");
//create yaf object - You may need to adjust the hardcoded values.
object userID = yaf.DB.user_login(1, txt_user.Text, sPassword);
if (userID != DBNull.Value)
{
//success
string idName = string.Format("{0};{1};{2}", userID, 1, txt_user.Text);
FormsAuthentication.SetAuthCookie(idName,false);
}else{
//Failed
}
}catch (Exception ex){}

balochbaahand
  • Posts: 16
  • Joined: 23/10/2008
Hello dear,
I created a website with my own custom login I want the users to automatically login to the forum on my site when they login to my site. You wanted the same , were you able to do it if yes can you please tell me how thanks.

Did anyone solve this please help me with it thanks..
mddubs
  • Posts: 476
  • Joined: 07/08/2008
This is how I did it...

I built an ASP.NET 2.0 (or higher) application before I even knew YAF existed. I used Forms Authentication to restrict access to 3 subdirectories; ~/guest/, ~/member/ and ~/admin/.

Guest is accessible to anyone, logged in or not.
Member is accessible to my 'Member' or 'Admin' role.
Admin is accessible only by 'Admin' role.

These permissions are set by adding a custom web.config file to each directory. If you're unsure how to do this, have Visual Studio do it for you. Select Project -> ASP.NET Configuration -> Security -> Create access rules. Create a rule and it will automatically create a web.config in the appropriate directory which you can then analyze and figure out how it works.

Then, when I discovered YAF, I simply put it into ~/members/forum/ and I'm done. My own authentication and login controls are being used and I could basically leave YAF wide-open (although I did go through and define permissions in YAF also).
UserPostedImage 
www.bunkerhollow.com  | www.careercomputing.com 
When I post fp:mddubs in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Mek 🙂, who stole this off Ederon 🙂 )
brk08
  • Posts: 3
  • Joined: 09/12/2008
aboovk wrote:

Hi,

I have a website with a login module.
When a user register with my website, i am creating required records in YAF tables too.
But now i am trying to make a single signup for both my website and for the YAF.
If a user login to the web by using my login page, he should be able to post messages to YAF without login again though the YAF login interface.

Can somebody help on this?

Thanks in advance.




Hi Aboovk,

Nice to meet you on YAF.

I am also having the same problem you have.
In our website we have one user table where the passwords and usernames will be there same username will be useul to post in the forum.
But I dont no how to get that.

what I must do it and where i must change please let me know and guide me to remove my doubts.
So that i am very grateul to you.

Please help me.
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