Custom database authentication - Single Sign on?

Mar 8, 2013 at 6:22 PM
If I use Custom database authentication to share UserIDs between my main app and NearForums that I put in a subdomain of my main app...will users have to sign on a second time when they are already logged into main app and hit a link to go to my forum?
Coordinator
Mar 8, 2013 at 6:26 PM
Hi,
As is today, it is not possible to have SSO with database authentication.
We only support ASP.NET Membershio for SSO.

Kind Regards,
Jorge
Mar 8, 2013 at 7:17 PM
Thanks for the quick response, Jorge.

Just to make sure I am clear...I am using the new memberships which come with MVC 4...so there is no way to link NearForums for SSO with that also, right?
Do you think it would take me a lot of effort to customize your source to work with the new MVC 4 memberships? Thanks for everything!
Mar 8, 2013 at 8:13 PM
Thanks for the quick response, Jorge.

Just to make sure I am clear...I am using the new memberships which come with MVC 4...so there is no way to link NearForums for SSO with that also, right?
Do you think it would take me a lot of effort to customize your source to work with the new MVC 4 memberships? Thanks for everything!
Coordinator
Mar 8, 2013 at 8:17 PM
Edited Mar 8, 2013 at 8:17 PM
Hi,
If you are using SimpleMembership it is compatible with ASP.NET Membership.
If that is the case, you should be able to configure your asp.net membership provider on Nearforums...

Kind Regards,
Jorge
Mar 9, 2013 at 12:41 AM
Thanks for the quick response, Jorge.

Just to make sure I am clear...I am using the new memberships which come with MVC 4...so there is no way to link NearForums for SSO with that also, right?
Do you think it would take me a lot of effort to customize your source to work with the new MVC 4 memberships? Thanks for everything!
Mar 9, 2013 at 1:27 AM
Jorge,
Would you be able to point to (or provide :) ) an actual example of using the mvc4 SimpleMemberShip provider with NearForums?
Mar 9, 2013 at 1:43 AM
Jorge,
Would you be able to point to (or provide :) ) an actual example of using the mvc4 SimpleMemberShip provider with NearForums?
Mar 9, 2013 at 2:18 AM
Jorge,
Would you be able to point to (or provide :) ) an actual example of using the mvc4 SimpleMemberShip provider with NearForums?
Mar 9, 2013 at 2:39 AM
Jorge,
Would you be able to point to (or provide :) ) an actual example of using the mvc4 SimpleMemberShip provider with NearForums?
Mar 18, 2013 at 9:10 PM
Hi again Jorge,

I am editting my Web.config to use SimpleMemberShip provider (WebMatrix.WebData.SimpleMembershipProvider) under the <membership> section...but I get an error "You must call the "WebSecurity.InitializeDatabaseConnection" method before you call any other method of the "WebSecurity" class."

Any idea how to fix this? Is their a specific provider I should specify to work with mvc4 Simplemembership???

Any help is greatly appreciated!! Thanks.
Nick
Coordinator
Mar 19, 2013 at 9:57 AM
Hi,
A couple of questions:
  1. You are using SimpleMembership and you already set it up on a database?
  2. Are you pointing (set the conn string) to that database that has the SimpleMembershipTable objects on the Nearforums web.config?
Kind Regards,
Jorge
Mar 19, 2013 at 1:46 PM
Hi Jorge,

__Yes, to both questions.

My existing application already uses SimpleMembership. Below are the 2 connectiostringfs for the Forums data and my existing database:__

<connectionStrings>
 <add name="forums" connectionString="Data Source=rosebloom.arvixe.com;Initial Catalog=my_Forums;Integrated Security=False;User           ID=xxxx;Password=xxxx;Connect Timeout=15;Encrypt=False;TrustServerCertificate=False;MultipleActiveResultSets=True;" providerName="System.Data.SqlClient" />

  <add name="MainAppConnect" connectionString="Data Source=rosebloom.arvixe.com;Initial Catalog=ExistingDatabase;Integrated Security=False;User ID=xxxx;Password=xxxx;Connect Timeout=15;Encrypt=False;TrustServerCertificate=False;MultipleActiveResultSets=True;" providerName="System.Data.SqlClient" />
</ connectionStrings>


And below is the Provider info I edited in the Web.config file (if I comment out the optional name="forums" I still get the same error):

<membership defaultProvider="ForumsMembershipProvider">
<providers>
    <clear/>

    <add name="ForumsMembershipProvider" type="WebMatrix.WebData.SimpleMembershipProvider, WebMatrix.WebData" connectionStringName="MainAppConnect" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="30" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" applicationName="/" />

                        <add name="forums" type="System.Web.Security.SqlMembershipProvider" connectionStringName="forums" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="30" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" applicationName="/" /> 


        </providers>
    </membership>
Any help you can give would be great! Thanks for creating this for everyone!!
Nick
Coordinator
Mar 19, 2013 at 2:03 PM
Hi,
It looks good...
One last try, could you include this in your Nearforums web.config, appSettings section:
<add key="enableSimpleMembership" value="true" />
I have no experience with SimpleMembership, I read that it is backwards compatible with ASP.NET Membership but I couldn't find an example...

Kind Regards,
Jorge
Mar 19, 2013 at 2:16 PM
Hi Jorge,

__Yes, to both questions.

My existing application already uses SimpleMembership. Below are the 2 connectiostringfs for the Forums data and my existing database:__

<connectionStrings>
 <add name="forums" connectionString="Data Source=rosebloom.arvixe.com;Initial Catalog=my_Forums;Integrated Security=False;User           ID=xxxx;Password=xxxx;Connect Timeout=15;Encrypt=False;TrustServerCertificate=False;MultipleActiveResultSets=True;" providerName="System.Data.SqlClient" />

  <add name="MainAppConnect" connectionString="Data Source=rosebloom.arvixe.com;Initial Catalog=ExistingDatabase;Integrated Security=False;User ID=xxxx;Password=xxxx;Connect Timeout=15;Encrypt=False;TrustServerCertificate=False;MultipleActiveResultSets=True;" providerName="System.Data.SqlClient" />
</ connectionStrings>


And below is the Provider info I edited in the Web.config file (if I comment out the optional name="forums" I still get the same error):

<membership defaultProvider="ForumsMembershipProvider">
<providers>
    <clear/>

    <add name="ForumsMembershipProvider" type="WebMatrix.WebData.SimpleMembershipProvider, WebMatrix.WebData" connectionStringName="MainAppConnect" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="30" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" applicationName="/" />

                        <add name="forums" type="System.Web.Security.SqlMembershipProvider" connectionStringName="forums" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="30" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" applicationName="/" /> 


        </providers>
    </membership>
Any help you can give would be great! Thanks for creating this for everyone!!
Nick
Coordinator
Mar 19, 2013 at 2:16 PM
Hi,
It looks good...
One last try, could you include this in your Nearforums web.config, appSettings section:
<add key="enableSimpleMembership" value="true" />
I have no experience with SimpleMembership, I read that it is backwards compatible with ASP.NET Membership but I couldn't find an example...

Kind Regards,
Jorge
Mar 19, 2013 at 2:18 PM
Thanks Jorge...but that did not seem to help.

Please let me know if you come accross any other suggestions. I will let you know if I find anything out to solve the issue. Thanks again.
Mar 19, 2013 at 7:24 PM
Thanks Jorge...but that did not seem to help.

Please let me know if you come accross any other suggestions. I will let you know if I find anything out to solve the issue. Thanks again.
Mar 22, 2013 at 1:07 PM
Thanks Jorge...but that did not seem to help.

Please let me know if you come accross any other suggestions. I will let you know if I find anything out to solve the issue. Thanks again.
Mar 22, 2013 at 1:07 PM
Hi Jorge,

__Yes, to both questions.

My existing application already uses SimpleMembership. Below are the 2 connectiostringfs for the Forums data and my existing database:__

<connectionStrings>
 <add name="forums" connectionString="Data Source=rosebloom.arvixe.com;Initial Catalog=my_Forums;Integrated Security=False;User           ID=xxxx;Password=xxxx;Connect Timeout=15;Encrypt=False;TrustServerCertificate=False;MultipleActiveResultSets=True;" providerName="System.Data.SqlClient" />

  <add name="MainAppConnect" connectionString="Data Source=rosebloom.arvixe.com;Initial Catalog=ExistingDatabase;Integrated Security=False;User ID=xxxx;Password=xxxx;Connect Timeout=15;Encrypt=False;TrustServerCertificate=False;MultipleActiveResultSets=True;" providerName="System.Data.SqlClient" />
</ connectionStrings>


And below is the Provider info I edited in the Web.config file (if I comment out the optional name="forums" I still get the same error):

<membership defaultProvider="ForumsMembershipProvider">
<providers>
    <clear/>

    <add name="ForumsMembershipProvider" type="WebMatrix.WebData.SimpleMembershipProvider, WebMatrix.WebData" connectionStringName="MainAppConnect" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="30" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" applicationName="/" />

                        <add name="forums" type="System.Web.Security.SqlMembershipProvider" connectionStringName="forums" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="30" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" applicationName="/" /> 


        </providers>
    </membership>
Any help you can give would be great! Thanks for creating this for everyone!!
Nick