集成多个 ASP.Net 网站
我想创建一个新网站。该网站有 3 个应用程序,每个应用程序都有自己的会员资格/个人资料提供商。
我希望用户能够通过单点登录登录到该网站。
可能的选项 AFAIK:
- 为所有应用程序在其
web.config
文件中定义相同的机器键/连接字符串,我认为我已经准备好了。
这有效吗?我很好奇是否还有其他方法。
I want to create a new website. The website has 3 applications, each one has its own membership/profile provider.
I want the user to be able to log in to the site with one single sign on.
Possible option AFAIK:
- Define the same machinekeys/Connection Strings for all applications in their
web.config
files and I think I'm all set.
Does this work? And I'm curious to see if there's any other way.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,这就是要走的路。只需确保配置设置相同,并且所有三个应用程序都能正常工作。
顺便说一句:您说您想建立一个包含 3 个应用程序的新网站。这些“应用程序”是单独的站点还是顶级站点的虚拟目录?换句话说,他们会共享相同的 URL 吗?
我能想到的唯一问题是,如果 URL 不同,那么会话 id 也会不同,因此强制用户在访问时登录每个会话。这对于你的情况可能没问题。使用您的方法,凭据将是相同的。
Yeah, that is the path to go. Just make sure the config settings are identical and all three apps will work together just fine.
As a side: you say you want to build a new website with 3 applications. Are those "apps" separate sites or virtual directories of the top site? In other words, will they share the same URL?
The only issue I can think of is if the URL's are different then the session id's will also be different and therefore force the user to log in to each of them on access. This might be okay in your situation. With your method the credentials will be the same though.