开发者

ASP.NET ApplicationId

I've read somewhere that ApplicationID is a unique id for a website (IIS site path). But I'm still confused.

  • When and why do I need this?
  • I'm trying to implement asp.net membership for a website and I'll create some 开发者_StackOverflow中文版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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜