Asp.Net Provider Model Exceptions with MySql Provider

Asp.Net Provider Model Exceptions with MySql Provider

Postby idem84 » Tue 12 Aug 2014 15:30

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 ...
idem84
 
Posts: 50
Joined: Thu 04 Apr 2013 19:12

Re: Asp.Net Provider Model Exceptions with MySql Provider

Postby idem84 » Wed 13 Aug 2014 22:47

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/vstudio/ms178586(v=vs.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>
idem84
 
Posts: 50
Joined: Thu 04 Apr 2013 19:12

Re: Asp.Net Provider Model Exceptions with MySql Provider

Postby Pinturiccio » Thu 14 Aug 2014 15:14

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.
Pinturiccio
Devart Team
 
Posts: 2025
Joined: Wed 02 Nov 2011 09:44

Re: Asp.Net Provider Model Exceptions with MySql Provider

Postby idem84 » Thu 04 Sep 2014 13:30

Hi!
Any news of fix it?
Thanks in advance!
idem84
 
Posts: 50
Joined: Thu 04 Apr 2013 19:12

Re: Asp.Net Provider Model Exceptions with MySql Provider

Postby Pinturiccio » Mon 08 Sep 2014 12:56

We are investigating the issue, but we can't tell any timeframe at the moment.
Pinturiccio
Devart Team
 
Posts: 2025
Joined: Wed 02 Nov 2011 09:44

Re: Asp.Net Provider Model Exceptions with MySql Provider

Postby Pinturiccio » Mon 29 Sep 2014 14:33

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/universal/download.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/universal/download.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/system.web.security.sqlmembershipprovider.getpassword%28v=vs.110%29.aspx
Pinturiccio
Devart Team
 
Posts: 2025
Joined: Wed 02 Nov 2011 09:44

Re: Asp.Net Provider Model Exceptions with MySql Provider

Postby Pinturiccio » Fri 10 Oct 2014 09:10

New build of dotConnect Universal 3.50.761 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/universal/download.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
Pinturiccio
Devart Team
 
Posts: 2025
Joined: Wed 02 Nov 2011 09:44


Return to dotConnect Universal