简体   繁体   English

两个不同的应用程序,其中一个具有登录页面

[英]Two different applications with the login page in one of them

I've made 2 distinct solutions, but one of them has a login page. 我提出了两种不同的解决方案,但是其中一种具有登录页面。 I want that when you log in the application, my client will be able to access the second application also. 我希望当您登录该应用程序时,我的客户端也能够访问第二个应用程序。 If my client haven't logged in the application and try to access any application, he will be redirected to the Login page that exists only in one solution. 如果我的客户尚未登录该应用程序并尝试访问任何应用程序,则将其重定向到仅在一种解决方案中存在的“登录”页面。

   Solution 1
        - Login page
        - Ui

   solution 2
        - Ui

To do a validation in my Solution 1 is simple because my Login page exists there, but I don't know how can I see in my Solution 2 if the client is already logged in. 在解决方案1中进行验证很简单,因为其中存在“登录”页面,但是我不知道如何在解决方案2中看到客户端是否已经登录。

Can you give me some tips ? 你能给我一些提示吗?

I read this article and tried to implement the code but in my case, exists 2 different applications (solutions) 阅读了这篇文章并尝试实现代码,但就我而言,存在2个不同的应用程序(解决方案)

Both of them will run under the same domain 它们都将在同一域下运行

As they are both hosted on the same domain they can both share the same forms authentication cookie. 由于它们都托管在同一个域中,因此它们都可以共享相同的表单身份验证cookie。

All you would need to do is ensure the forms authentication settings are the same in both of the web.config files. 您需要做的就是确保两个web.config文件中的表单身份验证设置都相同。 This way when an unauthorised user tries to access Solution 2, it will redirect them to Solution 1 (As that will be the loginUrl attribute in the web.config) to login. 这样,当未经授权的用户尝试访问解决方案2时,会将他们重定向到解决方案1(因为这将是web.config中的loginUrl属性)以登录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 一个CUIT测试可以支持测试不同计算机上的两个应用程序吗? - Can one CUIT test support testing two applications that are on different computers? 在一列中按两种不同的类型分组并获得它们的总和 - Group by two different type in one column and get the sum of them 两个不同的 comboxBoxes 显示相同的值,因为其中一个更改 - two different comboxBoxes show the same value as one of them changes 两个不同应用程序之间的通信 - Communication between two different applications 两个应用程序,一个数据库,NHibernate - Two applications, one database, NHibernate MVC One Type,One Page - 两种不同的DisplayFor - MVC One Type, One Page - Two different DisplayFor 登录时显示不同的页面 - on login display a different page 不同域上的登录页面 - Login page on different domain 我在两个不同的应用程序中具有相同的代码,但在一个应用程序中,我的 OperationContextScope 被乱序处理 - I have the same code in two different applications but in one I have this OperationContextScope being disposed out of order 一个DLL具有两个应用程序的两个实现 - One DLL with two implementations for two applications
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM