Membership.GetUser() returns ArgumentNullException

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
SHoyt
Posts: 2
Joined: Sat 10 Mar 2007 23:08

Membership.GetUser() returns ArgumentNullException

Post by SHoyt » Sat 10 Mar 2007 23:14

I'm trying to determine if the user has been authenticated. I was using the following code before changing Providers:

' Check for a logged in user;
Dim aUser As MembershipUser = Membership.GetUser()

If aUser IsNot Nothing Then
Me.LoginStatus1.LogoutText = String.Format("Welcome, {0}! (click here to log out)", aUser.UserName)
End If


Since installing your MySQL providers, I now receive the following error message:

System.ArgumentNullException was unhandled by user code
Message="Value cannot be null.
Parameter name: username"
ParamName="username"
Source="CoreLab.MySql.Web"
StackTrace:
at CoreLab.Common.Web.Providers.DbMembershipProvider.GetUser(String username, Boolean userIsOnline)
at System.Web.Security.Membership.GetUser(String username, Boolean userIsOnline)
at System.Web.Security.Membership.GetUser()
at service.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\mts\service.master.vb:line 16
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 12 Mar 2007 09:31

On which line the error occur?
Please send me your test project to reproduce the problem.
Use e-mail address provided in the Readme file.

SHoyt
Posts: 2
Joined: Sat 10 Mar 2007 23:08

Post by SHoyt » Mon 12 Mar 2007 19:36

I zipped and sent the code as requested.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 13 Mar 2007 13:14

You project is received and is being investigated.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Wed 14 Mar 2007 09:45

We have fixed the problem. Look forward to the next build.

Post Reply