"Provider not specified" Membership Provider Exception

"Provider not specified" Membership Provider Exception

Postby idem84 » Mon 11 Aug 2014 21:54

Hi!
I try to follow instructions in http://www.devart.com/dotconnect/universal/docs/AspProviders.html

I am not able to implement dotConnectUniversal MembershipProvider with MySql Uniprovider and dotConnect Universal 3.50.668.0

if i set passwordFormat=Clear
{"An exception occurred. Please contact your administrator."}
Inner exception says "Provider not specified" in Membership.CreateUser method

if i set passwordFormat=Hashed
Provider can not encode password
Inner exception says "Provider not specified" in Membership.CreateUser method

if i set passwordFormat=Encrypted
"You must specify a non-autogenerated machine key to store passwords in the encrypted format. Either specify a different passwordFormat, or change the machineKey configuration to use a non-autogenerated decryption key."

Thanks in advance

Sample web.config:
===========
<configuration>
<connectionStrings>
<remove name="UniServices" />
<add name="Provider" connectionString="MySQL"/>
<add name="UniServices" connectionString="User Id=root;password=root;Host=localhost;Database=aspnetprovider" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0" />

<membership defaultProvider="AspNetUniMembershipProvider"
userIsOnlineTimeWindow="15">
<providers>
<add
name="AspNetUniMembershipProvider"
type="Devart.Data.Universal.Web.Providers.UniMembershipProvider,
Devart.Data.Universal.Web, Version=3.50.668.0, Culture=neutral,
PublicKeyToken=09af7300eec23701"
connectionStringName="UniServices"
enablePasswordRetrieval="true"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
minRequiredPasswordLength="6"
minRequiredNonalphanumericCharacters="0"
requiresUniqueEmail="false"
passwordFormat="Clear"
maxInvalidPasswordAttempts="5"
passwordAttemptWindow="10" />
</providers>
</membership>

</system.web>

</configuration>
===========

Sample code:
===========
var outMemberCreateStatus = new MembershipCreateStatus();
var res = Membership.CreateUser("anyuser", "anypassword1845", "anyemail@gmail.com", "anyquestion", "anyanswer", true, null, out outMemberCreateStatus); //Here exceptions thrown
===========

Stacktrace:
at Devart.Data.Universal.n.a(String A_0, Boolean A_1)
at Devart.Data.Universal.n.b(String A_0)
at Devart.Data.Universal.UniConnectionStringBuilder.a(String A_0)
at Devart.Data.Universal.UniConnectionStringBuilder.set_ConnectionString(String value)
at Devart.Data.Universal.UniConnectionStringBuilder..ctor(String connectionString)
at Devart.Data.Universal.n.a(String A_0, da A_1)
at Devart.Common.DbConnectionFactory.a(String A_0, da& A_1)
at Devart.Common.DbConnectionBase.set_ConnectionString(String value)
at Devart.Data.Universal.UniConnection.set_ConnectionString(String value)
at Devart.Common.Web.Providers.DbMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object userId, MembershipCreateStatus& status)
Last edited by idem84 on Tue 12 Aug 2014 14:20, edited 1 time in total.
idem84
 
Posts: 50
Joined: Thu 04 Apr 2013 19:12

Re: "Provider not specified" Membership Provider Exception

Postby idem84 » Mon 11 Aug 2014 22:07

Fixed. Actually official web documentation has missed Provider value( http://www.devart.com/dotconnect/universal/docs/AspProviders.html)
<add name="UniServices" connectionString="User Id=root;Host=localhost;Database=Test" />

Should be
<add name="UniServices" connectionString="Provider=MySQL;User Id=root;Host=localhost;Database=Test" />
idem84
 
Posts: 50
Joined: Thu 04 Apr 2013 19:12

Re: "Provider not specified" Membership Provider Exception

Postby Pinturiccio » Wed 13 Aug 2014 15:26

You are right, you need to specify the 'Provider' connection string parameter. We will make the corresponding changes to our documentation and post here about the results as soon as possible.
Pinturiccio
Devart Team
 
Posts: 1982
Joined: Wed 02 Nov 2011 09:44

Re: "Provider not specified" Membership Provider Exception

Postby Pinturiccio » Tue 16 Sep 2014 14:49

Thank you for the information, we have changed our documentation. For more information, please refer to http://www.devart.com/dotconnect/universal/docs/?AspProviders.html
Pinturiccio
Devart Team
 
Posts: 1982
Joined: Wed 02 Nov 2011 09:44


Return to dotConnect Universal