views:

57

answers:

1

Hi, I've read somewhere that ApplicationID is a unique id for a website (iis site path). But I'm still confused. Here are my questions..

  • When and why do I need this?
  • I'm trying to implement asp.net membership for a website and I'll create some additional SQL tables (such as Companies, Services, etc) other than asp.net membership tables. So; do I need to include an ApplicationID column to these custom tables? Why?

Thanks for your help.

+2  A: 

The application ID is stored in a the aspnet_Applications table in your membership database. When you first enable the ASP Memebership provider, the application name that you set in your web.config is entered into this table. From then on, the membership provider uses your application name to determine which users can login for user authentication in your app.

To answer your second question, no, unless you have a unique need/requirement to do so. Reason: The asp.net membership is setup so that you can host multiple possibly distinct applications using one membership database. This is nice in that you do not have to create a different database for each one of your sites for authentication. Unless you will have multiple/distinct applications hitting these other tables that you have mentioned, you do not need to worry about assigning the appID to them as your users are already logged in.

Tommy