Welcome Guest Search | Active Topics | Log In | Register

Integrating YAF and ASP Security Options · View
vitinval
#1 Posted : Friday, August 08, 2008 9:02:58 AM

Rank: YAF Forumling


Joined: 8/8/2008
Posts: 3
Hello

We're trying to integrate YAF with an existing application. We are using ASPNETDB and we would like to use the same tables for YAF authentication.

We don´t know if we are doing something wrong or we don´t understand how to integrate security
Doing this, we have two users tables (one for ASP and one for YAF) and we would like to have just one.

We are using 1.9.3 Beta and web.config has the following
<roleManager enabled="true" defaultProvider="YafRoleProvider">
<providers>
<clear/>
<add connectionStringName="yafnet" applicationName="YetAnotherForum" name="YafRoleProvider" type="YAF.Providers.Roles.YafRoleProvider"/>
</providers>
</roleManager>
<membership defaultProvider="YafMembershipProvider" hashAlgorithmType="SHA1">
<providers>
<clear/>
<add connectionStringName="yafnet" applicationName="YetAnotherForum" name="YafMembershipProvider" requiresUniqueEmail="true" useSalt="true" type="YAF.Providers.Membership.YafMembershipProvider"/>
</providers>
</membership>
<profile enabled="true" defaultProvider="YafProfileProvider" inherits="YAF.Classes.Utils.YafUserProfile">
<providers>
<clear/>
<add connectionStringName="yafnet" applicationName="YetAnotherForum" name="YafProfileProvider" type="YAF.Providers.Profile.YafProfileProvider"/>
</providers>
</profile>
Jaben
#2 Posted : Friday, August 08, 2008 10:43:37 PM

Rank: YAF Head Dude



Joined: 10/10/2004
Posts: 2,961
Location: Honolulu, HI
Use the same membership/role setting as your main application. These are just the YAF Custom Provider settings.
"When you are grateful, fear disappears and abundance appears”."

vitinval
#3 Posted : Tuesday, August 12, 2008 9:18:26 AM

Rank: YAF Forumling


Joined: 8/8/2008
Posts: 3
Sorry Jaben Sad
Can you post an example of both web.config (main application and YAF application)??

Do we have to write some code in main application to get the user logged in??
Do we have to have the two projects (main application and YAF app) in the same solution??

Thanks
Jaben
#4 Posted : Wednesday, August 13, 2008 2:33:03 AM

Rank: YAF Head Dude



Joined: 10/10/2004
Posts: 2,961
Location: Honolulu, HI
No. You're application uses membership -- you just use the same settings in YAF.
"When you are grateful, fear disappears and abundance appears”."

vitinval
#5 Posted : Wednesday, August 13, 2008 11:10:45 AM

Rank: YAF Forumling


Joined: 8/8/2008
Posts: 3
Thanks Jaben

I'm using same settings in both web config. If I register an user by using forum register form, a new record is created in aspnet_Users table. That's good.
But I can´t get logged in main application using the new user. I don´t care.

In other hand, if I get logged in using a user created in main application, user not logged in forum. This is the main goal I would like to get. I'm sure I'm doing something wrong.

Vitinval
Users browsing this topic
Guest
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.

YAFPro Theme Created by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.3 RC2 | YAF © 2003-2008, Yet Another Forum.NET
This page was generated in 0.080 seconds.

SourceForge.net Logo Powered by ASP.NET v2.0 411ASP.NET