getting application ID

K

Keith G Hicks

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
HostingEnvironment.ApplicationID 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_Applications. Is there a way to get that without doing a SQL
statement in my VB code based on the application name?

Thanks,

Keith
 
K

Keith G Hicks

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_Applications WHERE ApplicationName =
'/Website1'"

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

Thanks,

Keith
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top