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
Keith G Hicks - 06 Mar 2008 23:06 GMT
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