Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Problem with Membership.GetUser()

Problem with Membership.GetUser()

Scheduled Pinned Locked Moved ASP.NET
helpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Majid Shahabfar
    wrote on last edited by
    #1

    Hi there, I use the following codesnipet to retrieve the user information: MembershipUser user = Membership.GetUser("username"); but I get this error: Specified cast is not valid. any idea?

    L P 2 Replies Last reply
    0
    • M Majid Shahabfar

      Hi there, I use the following codesnipet to retrieve the user information: MembershipUser user = Membership.GetUser("username"); but I get this error: Specified cast is not valid. any idea?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      This error might occur if your aspnet_ tables have some invalid records or if you edit the aspnet tables directly without using tools like ASP.NET confuguration tool. Delete the asp_net tables and recreate them. Hope this will help you.

      1 Reply Last reply
      0
      • M Majid Shahabfar

        Hi there, I use the following codesnipet to retrieve the user information: MembershipUser user = Membership.GetUser("username"); but I get this error: Specified cast is not valid. any idea?

        P Offline
        P Offline
        padmanabhan N
        wrote on last edited by
        #3

        MembershipUser user = Membership.GetUser("username"); in this the getuser is a method i think so u have to cast like the below code //CheckBox chkBxSelect = (CheckBox)e.Row.Cells[1].FindControl("chkselect");

        Padmanabhan

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups