virk0009
  •  virk0009
  • 53.6% (Neutral)
  • YAF Forumling Topic Starter
2009-04-17T15:22:26Z
Hi,
I have a existing database with sqlmembership, I want to use it to log on to yaf. i am asking this qustion again,
As I posted this thing in a different forum but no body helped.
I have created a role "registered" (using Administration wizard) also and created one user under this role. But still cant login to the
forum. does it has to do anythng with hashing. How is password being stored in the database.

here is my yafnet.config file.

<yafnet>
<connstr>Data Source=LAPTOP\SQLEXPRESS;Initial Catalog=yaf_db;User ID=myuser;Password=mypassword</connstr>
<uploaddir>~/upload/</uploaddir>
<boardid>1</boardid>
<!-- Enable URL Rewriting -->
<enableurlrewriting>false</enableurlrewriting>
<!--logtomail>email=;server=;user=;pass=;</logtomail-->
<!--categoryid>1</categoryid-->
<!-- Enable these to use a custom user class "provider" -->
<!--CustomUserAssembly>TinyGecko.YAFIntegration.dll</CustomUserAssembly>
<CustomUserClass>TinyGecko.YAFIntegration.yafUserClass</CustomUserClass-->
</yafnet>

and here is my web.config

<?xml version="1.0"?>
<configuration>
<configSections>
<section name="yafnet" type="yaf.SectionHandler,yaf"/>
<section name="rewriter"
type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler,
Intelligencia.UrlRewriter"/>
</configSections>
<connectionStrings>
<add name="myMembershipDB"
connectionString="Data Source=LAPTOP\SQLEXPRESS;Initial Catalog=mem_DB;User ID=myserid;
Password=mypassword"
providerName="System.Data.SqlClient"/>
</connectionStrings>
<yafnet configSource="yafnet.config"/>
<rewriter configSource="urlrewriter.config"/>
<system.web>
<roleManager enabled="true" defaultProvider="customRoleProvider">
<providers>
<clear/>
<add connectionStringName="myMembershipDB"
applicationName="/"
name="customRoleProvider"
type="System.Web.Security.SqlRoleProvider"/>
</providers>
</roleManager>
<membership defaultProvider="customMembershipProvider">
<providers>
<clear/>
<add connectionStringName="myMembershipDB"
applicationName="/"
name="customMembershipProvider"
requiresUniqueEmail="true"
minRequiredNonalphanumericCharacters="0"
minRequiredPasswordLength="5"
maxInvalidPasswordAttempts="20"
passwordAttemptWindow="10"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
type="System.Web.Security.SqlMembershipProvider"/>
</providers>
</membership>
<profile enabled="true" defaultProvider="YafProfileProvider" >
<providers>
<clear/>
<add connectionStringName="customMembershipProvider" applicationName="/" name="YafProfileProvider" type="YAF.Providers.Profile.YafProfileProvider"/>
</providers>
</profile>
<httpModules>
<add type="Intelligencia.UrlRewriter.RewriterHttpModule,Intelligencia.UrlRewriter" name="UrlRewriter"/>
</httpModules>
<globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
<compilation defaultLanguage="c#" debug="true">
</compilation>
<authentication mode="Forms">
<forms name=".YAFNET_Authentication" timeout="525600"/>
</authentication>
<customErrors defaultRedirect="error.aspx" mode="RemoteOnly"/>
<!--trace enabled="true" pageOutput="true"/-->
<xhtmlConformance mode="Legacy"/>
</system.web>
<system.codedom>
</system.codedom>
<system.webServer>
</system.webServer>
</configuration>
Sponsor
Jaben
  •  Jaben
  • 100% (Exalted)
  • YAF Developer
2009-04-21T02:05:36Z
Sorry but custom membership providers are outside the scope of support I can provide.... just way too many variables.
virk0009
  •  virk0009
  • 53.6% (Neutral)
  • YAF Forumling Topic Starter
2009-04-21T21:14:40Z
Hi Jaben,

No, its not custom. its just standard aspnet membership and roles.
I think you guys are saying it can be used, but dont know how.
I read this link here http://forum.yetanotherf...rovider-integration.aspx 
if u can help, it will be great.

Regards
Parminder
jshepler
2009-04-22T11:56:03Z
virk0009 wrote:

Hi,
I have a existing database with sqlmembership, I want to use it to log on to yaf. i am asking this qustion again,
As I posted this thing in a different forum but no body helped.
I have created a role "registered" (using Administration wizard) also and created one user under this role. But still cant login to the
forum. does it has to do anythng with hashing. How is password being stored in the database.



You have 2 different databases configured - one for your existing members and the other for yaf. I'm pretty sure they need to be the same database. It's ok to install yaf into your existing database, it prefixes everything with "yaf_" so it won't overwrite anything.


not jsheLPer
virk0009
  •  virk0009
  • 53.6% (Neutral)
  • YAF Forumling Topic Starter
2009-04-22T21:21:53Z
Hi Thanks,

My question is can i use my existing membership data to log into system.

Regards
Paraminder
jshepler
2009-04-23T03:31:32Z
virk0009 wrote:

Hi Thanks,

My question is can i use my existing membership data to log into system.

Regards
Paraminder



Yes.
not jsheLPer
virk0009
  •  virk0009
  • 53.6% (Neutral)
  • YAF Forumling Topic Starter
2009-04-23T21:38:41Z
Hi JShelper,

Can someone expain how can I do. What changes do i need to the config files.
I have included my config files, so if u can just explain the settings i need to do.



Thanks
Parminder
jshepler
2009-04-24T03:34:08Z
I was wrong - it doesn't need to be the same database.

There isn't anything you need to change in the web.config for yaf to work with your existing membership. Yaf will use whatever provider you already have configured. The first time an authenticated user visits the forum, yaf will add that user to its database.

You still need to install and configure yaf itself, though. You said that you created the "Registered" role. The yaf install does this, so if you had to do this yourself, it sounds like maybe you didn't run the install?

not jsheLPer
virk0009
  •  virk0009
  • 53.6% (Neutral)
  • YAF Forumling Topic Starter
2009-04-24T15:35:45Z
Hi jshelper,

When you say authenticated user, how can it be authenticated when it doesnt find that user in
yaf database, coz that user is in other tables (aspnet_Membership and others). It wont let the user
go, coz it validates to its own tables, or should i use some other interface to log in where they are authonticated
by aspnet tables.

Your help will be appritiated.

Regards
Parminder
jshepler
2009-04-25T04:13:56Z
virk0009 wrote:

Hi jshelper,

When you say authenticated user, how can it be authenticated when it doesnt find that user in
yaf database, coz that user is in other tables (aspnet_Membership and others). It wont let the user
go, coz it validates to its own tables, or should i use some other interface to log in where they are authonticated
by aspnet tables.

Your help will be appritiated.

Regards
Parminder



Yaf doesn't do the authentication - asp.net does. Yaf just asks asp.net who the current user is.


not jsheLPer
Users browsing this topic

    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