Author: chrislo2401 | Posted on: 5/7/2009 10:26:52 PM | Views : 253

Hi all,
I'm having a real struggle trying to get the UserID out from the aspnet_Users table for some reason.
I've tried doing  it this way to return it directly:
Public Shared Function GetUserGUIDForUnauthenticatedUser(ByVal username As String) As Guid

    Dim db As New ShopDataContext

    Dim q = (From uid In db.aspnet_Users _
            Where uid.UserName = username _
            Select uid.UserId).FirstOrDefault

    Return q

End Function
If I put a breakpoint at 'Return q' and hover over it, it reads empty.

I've also tried it this way by retrieving the whole user:
Public Shared Function GetAspNetUser(ByVal username As String) As VB.aspnet_User

    Dim db As New ShopDataContext
Go to the complete details ...