ApplicationId

  • Thread starter Thread starter JJ
  • Start date Start date
I'm not sure. I am storing information in a table when a users registers on
the site.
I need to store their username etc, but also the ApplicationID of the site.

JJ
 
Yup.

That's the Membership ApplicationID.

It's simply an unique identifier column with name ApplicationID
in the aspnet_Applications table in the Membership database.

Retrieve it just like you would any other table field.

See:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/asp2prvdr02.asp

You may find it simpler to set/retrieve the Application name in the web.config for your app:
http://msdn2.microsoft.com/en-us/library/system.web.security.membership.applicationname.aspx




Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
 
But how does the membership provider get the ApplicationId in the first
place? (i.e. before any records are created)

Ideally I'd like to get it in the code then store it, rather than get it
from one table, then store it in another.

JJ
 
The uniqueidentifier is autogenerated; it's a 16-byte GUID.

See :
http://msdn2.microsoft.com/en-us/library/ms187942.aspx

I'm pretty sure you don't mean the uniqueidentifier field ( ApplicationID ).
That will be almost useless for your purposes.

As previously mentioned :

You may find it simpler to set/retrieve the Application name in the
web.config for your app:
http://msdn2.microsoft.com/en-us/library/system.web.security.membership.applicationname.aspx




Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
 
Back
Top