在 Web 应用程序之间共享配置文件和角色信息
Q1 Book 说,我们可以选择通过让配置文件提供者使用相同的 ApplicationName 值在 Web 应用程序之间共享配置文件信息。 但是应用程序共享角色是否也可以,或者这会带来安全风险吗?
Q2
如果ProfileManager.AutomaticSaveEnabled设置为True,那么当对任何配置文件数据进行更改时,ProfileModule将更新相应的数据库。 当处理包含简单类型的属性时,ProfileModule 检查IsDirty 以确定属性是否已更改。
A) 假设Profile.Name已经包含值“Irene”,当程序发出以下语句时:
Profile.Name = "Irene";
即使Name属性会被标记为脏尽管已为其分配了相同的值?
B) 如果 ProfileManager.AutomaticSaveEnabled 设置为 True 并且包含复杂类型的属性设置为只读,那么我假设 ProfileManager > 会意识到这一点,因此不会尝试连接数据库来保存此属性?
谢谢
Q1 Book says that we can choose to share profile information between web application by having profile providers use the same ApplicationName value. But would it also be ok for applications to share roles, or would that represent a security risk?
Q2
If ProfileManager.AutomaticSaveEnabled is set to True, then when change is made to any profile data, the ProfileModule will update tables in a database accordingly. When dealing with properties containing simple types, ProfileModule checks IsDirty to determine whether property has changed.
A) Assume Profile.Name already contains value “Irene”, when the program issues the following statement:
Profile.Name = "Irene";
Will Name property be marked as dirty even though same value has been assigned to it?
B) If ProfileManager.AutomaticSaveEnabled is set to True and if property containing complex type is set to read-only, then I assume ProfileManager will realize that and thus won’t try connect with database in order to save this property?
thanx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
1) 如果您对用户在两个站点上具有相同角色感到满意,那么这不是问题,并且可以提供简化的管理。 如果您希望用户在每个站点上拥有不同的角色,那么就需要将其分开。
2)抱歉,我不能说我已经尝试过这两种情况。
1) If you're happy with a user having the same roles on both sites, then it's not a problem, and provides simplified management. If you want the users to have different roles on each site, then there's something to be said for seperating it out.
2) Can't say I've tried either scenario, sorry.