Page 1 of 1

Asp.Net Provider Model Exceptions with MySql Provider

Posted: Tue 12 Aug 2014 15:30
by idem84
I am not able to implement dotConnectUniversal MembershipProvider with MySql Uniprovider and dotConnect Universal 3.50.668.0
Any help?
Thanks in advance!

Web.config with passwordFormat=Hashed
Membership.ValidateUser(...) //always return false

Web.config with passwordFormat=Clear
Membership.ValidateUser(...) //works ok
=======================
And for retrieve password
var usr = Membership.GetUser(...

var pass = usr.GetPassword(); //throws in parameterlesscontructor
var pass = usr.GetPassword("anyanswer"); //works ok
=======================
And for asign role to user
Roles.CreateRole("Admin");
Roles.AddUserToRole("anyuser", "Admin"); //throws here

{"Object reference not set to an instance of an object."}
Stacktrace:
at Devart.Data.Universal.Web.Providers.UniWebProvider.a(DbParameter A_0, DbType A_1, Object A_2)
at Devart.Data.Universal.Web.Providers.UniRoleProvider.ApplyParameterInfo(DbParameter parameter, DbType dbType, Object value)
at Devart.Common.Web.Providers.DbRoleProvider.a(String A_0, DbType A_1, Int32 A_2, Object A_3)
at Devart.Common.Web.Providers.DbRoleProvider.AddUsersToRoles(String[] usernames, String[] roleNames)
at Devart.Data.Universal.Web.Providers.UniRoleProvider.AddUsersToRoles(String[] usernames, String[] roleNames)
at System.Web.Security.Roles.AddUserToRole(String username, String roleName)
at AspNetUniProvider.Default.Page_Load(Object sender, EventArgs e) in ...

Re: Asp.Net Provider Model Exceptions with MySql Provider

Posted: Wed 13 Aug 2014 22:47
by idem84
I still having issues/questions about AspNet Provider Model...
I noticed that there is a column (in Mysql 'aspnet_sessions' table) named sessionitems but always is empty (session variables?), how to enable in uniSessionState that mode must be SqlState too, (if actually(mode=custom))
Thanks in advance!

I try to implement sql mode like MSDN Docs
http://msdn.microsoft.com/en-us/library ... .100).aspx
SqlServer(Mysql in my case) mode: stores session state in database. This ensures that session state is preserved if the Web application is restarted and also makes session state available to multiple Web servers in a Web farm.

<sessionState
...
mode="Custom"
customProvider="UniSessionProvider">
<providers>
<add name="UniSessionProvider"
...
</providers>
</sessionState>

Re: Asp.Net Provider Model Exceptions with MySql Provider

Posted: Thu 14 Aug 2014 15:14
by Pinturiccio
We have reproduced the issues with the Membership and role providers. We will investigate them and post here about the results as soon as possible.

Re: Asp.Net Provider Model Exceptions with MySql Provider

Posted: Thu 04 Sep 2014 13:30
by idem84
Hi!
Any news of fix it?
Thanks in advance!

Re: Asp.Net Provider Model Exceptions with MySql Provider

Posted: Mon 08 Sep 2014 12:56
by Pinturiccio
We are investigating the issue, but we can't tell any timeframe at the moment.

Re: Asp.Net Provider Model Exceptions with MySql Provider

Posted: Mon 29 Sep 2014 14:33
by Pinturiccio
idem84 wrote: Web.config with passwordFormat=Hashed
Membership.ValidateUser(...) //always return false

Web.config with passwordFormat=Clear
Membership.ValidateUser(...) //works ok
We have fixed the bug with the ValidateUser method of a Membership provider with the passwordFormat="Hashed" attribute. The fix is available in the latest public build of dotConnect Universal 3.50.751. The fix was added in the last moment before releasing the build, and it wasn't added to the build announce. We will add it into the announce of the next build, however it is already available since the build 3.50.751.
idem84 wrote: And for asign role to user
Roles.CreateRole("Admin");
Roles.AddUserToRole("anyuser", "Admin"); //throws here
dotConnect for MySQL 8.3.225 can be downloaded from http://www.devart.com/dotconnect/univer ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only).
We have fixed the bug with the AddUserToRole method of a Role provider. The fix is available in the latest public build of dotConnect Universal 3.50.751. The fix was added in the last moment before releasing the build, and it wasn't added to the build announce. We will add it into the announce of the next build, however it is already available since the build 3.50.751.

dotConnect Universal 3.50.751 can be downloaded from http://www.devart.com/dotconnect/univer ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only).
idem84 wrote: And for retrieve password
var usr = Membership.GetUser(...

var pass = usr.GetPassword(); //throws in parameterlesscontructor
var pass = usr.GetPassword("anyanswer"); //works ok
This is a designed behaviour. If the PasswordFormat attribute is set as "Hashed", the exception will be generated when calling the GetPassword method. For more information, please refer to http://msdn.microsoft.com/en-us/library ... 10%29.aspx

Re: Asp.Net Provider Model Exceptions with MySql Provider

Posted: Fri 10 Oct 2014 09:10
by Pinturiccio
New build of dotConnect Universal 3.50.761 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/univer ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?t=30555