Membership.GetUser() returns ArgumentNullException

Membership.GetUser() returns ArgumentNullException

Postby 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)
SHoyt
 
Posts: 2
Joined: Sat 10 Mar 2007 23:08

Postby 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.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby SHoyt » Mon 12 Mar 2007 19:36

I zipped and sent the code as requested.
SHoyt
 
Posts: 2
Joined: Sat 10 Mar 2007 23:08

Postby 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

Postby Alexey » Wed 14 Mar 2007 09:45

We have fixed the problem. Look forward to the next build.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43


Return to dotConnect for MySQL