getting application ID

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Keith G Hicks

    #1

    getting application ID

    I am trying to figure out how to get the UserID from aspnet_Users in my
    vb.net code after the user logs in. I have code that's pretty much working
    except for one thing. I need the value of the ApplicationID. I tried
    HostingEnvironm ent.Application ID but that returns something like this:

    '/LM/w3svc/1/ROOT/Website1'"

    but I need the GUID that's in the ApplicationID column in the table
    aspnet_Applicat ions. Is there a way to get that without doing a SQL
    statement in my VB code based on the application name?

    Thanks,

    Keith


  • Keith G Hicks

    #2
    Re: getting application ID

    Never mind. I realized that was the wrong ApplicationID. I needed the
    membership one. From what I have found out,the only way to get it is like
    this:

    SELECT ApplicationID FROM dbo.aspnet_Appl ications WHERE ApplicationName =
    '/Website1'"

    If there's an easier way, feel free to let me know.

    Thanks,

    Keith


    Comment

    Working...