English 中文(简体)
Profile and applicationName
原标题:


1) Is there a reason why aspnet_Profile table doesn’t have ApplicationId column, while aspnet_Membership and aspnet_Roles tables do define ApplicationID columns?


2) If we create a profile for current user and then change the applicationName of our profile provider, then profile for same user couldn’t be read anymore. So it seems profile provider somehow knows that table entry for this user was made before applicationName was changed?

But how is that possible, since aspnet_Profile doesn’t contain ApplicationID column?


Thank you


EDIT:

2) I don t see how to change the application name of a profile provider - it is not an attribute of a provider entry in the profile section. It IS an attribute of a provider in the membership section, which makes sense


I was able to specify applicationName attribute, so I must assume profile provider does use it in some way:

   <profile defaultProvider="defaultP">
    <providers>
      <add name="defaultP"
           connectionStringName="connect"
           applicationName="_someName"


问题回答

1) Looking at the database tables for the aspnet security system, a Profile record is tied to a user, and a user is tied to an application. Since all profiles are tied to users, the profile itself doesn t need to explicitly specify an application (this is implied by the user s application).

2) I don t see how to change the application name of a profile provider - it is not an attribute of a provider entry in the profile section. It IS an attribute of a provider in the membership section, which makes sense.





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签