Is it possible to share .ASPXAUTH cookie between MVC 5 and .Net core MVC 3.1 applications - asp.net-mvc-4

Currently, we are running MVC 5 application with form authentication(.ASPXAUTH) and now we are building a new part based on .Net core MVC 3.1.
and we are hosting the MVC 5 application on https://test.admin.com:80
and .Net core MVC3.1 application on https://test.admin.com:82
Constraint: User will be login to MVC 5 application (i.e https://test.admin.com:80)
form authentication(.ASPXAUTH) will happen, based on some condition they will be redirected to core application(https://test.admin.com:82).
Now the requirement is to consume API's (MVC 5) from the core application so I need to read the .ASPXAUTH cookie in the core application to authorize the API (MVC 5).
Is it possible to read the .ASPXAUTH cookie in the core application??
Thanks in advance.

Related

Which OpenId Grant Type should I use in MVC application? Code? Client Credentials?

With ASP.NET Core 5, Angular 10 and Identity Server 4 I created 4 applications:
Auth using Identity Server 4;
Asp.Net Core 5 API
Asp.Net Core 5 MVC
Angular 10 SPA
On the Angular application (4) I am using OIDC Client JS and Code Grant Type.
The Asp.Net Core 5 MVC application (3) also needs to access the API ...
I am using Identity Model but what Grant Type should I use in MVC application?
Code as in the Angular application (Is this possible?)? Client Credentials?
If you login the user on MVC application and you want to call the API on behalf of the user use the Code flow.
In this case only difference between MVC and angular apps is that Asp.Net Core 5 MVC is a confidential client and you can use Code flow. But Angular 10 SPA client is a public client and you should you Code + PKCE.
It is although recommended to use PKCE in both cases.
If you just call an API through MVC and as the app itself and not behalf of the user, you can use Client Credentials flow. This flow is for server to server scenarios and it is secure.
In this case you should do authorization for MVC app as well.

How to capture the process when login expires in asp.net core

I need to trigger a method when the user's login expires, I'm using asp.net core mvc and uses built in login features. Is that possible in asp.net core?

Looking for example of asp.net core web app calling an api both using AAD B2C

I am fairly new to development and I am looking for an example of an asp.net core web app calling an .net core api both protected by the same Azure AD B2C.
I found examples with 2.2 but I was not able to adapt them to core 3.1.
Thanks

Before save model in ASP.NET MVC 4

When I wrote web applications in Rails, it was very easy to control events like before_action, before_save. How to use they in ASP.NET MVC 4?

How to use Devexpress report in Asp.Net MVC 4 Web Application(Not DXperience v12.2 ASP.NET MVC Web Application )

I want to use Devexpress 12.2 xtrareport in Asp.Net MVC 4 Web Application.Now i think you will suggest me Create an ASP.NET MVC Application and Add a Report to It but in this they are using DXperience v12.2 ASP.NET MVC Web Application and i am using Asp.Net MVC 4 Web Application.
Is this possible ?
This is the solution which i find out :
1.)Please review the How to: Manually Register DevExpress Extensions to Start Using Them in an MVC Web Application documentation article to learn how to register DevExpress ASP.NET MVC extensions manually.
2.)This way, you will be able to create a reporting application using the approach from the
Create a Basic Report in ASP.NET MVC documentation article.