How to authenticate users from an existing db into Nearforums site

There are 3 methods to authenticate users from an existing repository or database into a Nearforums site.

ASP.NET Membership

If your website uses ASP.NET Membership, you can configure the same membership provider in the web.config file of the Nearforums site.
This method will avoid the need for explicit user log on actions (logging on mainsite will also log into Nearforums site). Remember to use the same machine key if you are using 2 different IIS websites.

Custom database authentication

If the database of your main site is accessible through a network connection, from the Nearforums site you can set up a custom db authentication provider.
To do so, create a procedure in your main db following this instructions.
Once you created it, add a new connection string pointing to your db (do not remove the connection string named "Forums"), in the web.config file located in the root folder of your Nearforums site. For example:
<add name="MainDb" connectionString="Data Source=YourDbServer;Initial Catalog=MainDb;User ID=sa;Password=12345678" providerName="System.Data.SqlClient"/>
Then, edit the element custom inside authenticationProviders on the Site.config file located in the folder Config. For example:

OpenId webring

This feature is useful for websites that already have a user repository, host a main site in another domain or subdomain (ex: and and you can't expose the repository to Nearforums by other methods.
It requires extra development work in your main site.
To enable this functionality, you must expose a OpenId Service Provider from your main site. If you are using .net in your main site, you can do it easily using Dotnetopenauth.
Once you create it, copy the url of the service provider to the element ssoOpenid in the configuration file Site.config, located in the folder <... site root...>/Config/Site.config.

Last edited Sep 4, 2012 at 1:08 PM by jorgebg, version 7


PetrAlexeev Nov 28, 2012 at 3:53 PM 
Examples of some popular OpenID Service Providers identifiers that can be used in the ssoOpeid element in the configuration file:
* - for myOpenID
* - for Google
* - for Yandex
*" - for Vkontakte

It is possible to try, e.g., Google OpenId webring, by using the following setting:
<ssoOpenid identifier="" />

Some additional information can be found here: