Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploying MVC Kentor integrated application in AWS server #1471

Open
pandey45 opened this issue Oct 7, 2024 · 0 comments
Open

Deploying MVC Kentor integrated application in AWS server #1471

pandey45 opened this issue Oct 7, 2024 · 0 comments

Comments

@pandey45
Copy link

pandey45 commented Oct 7, 2024

I have an existing MVC application integrated with Kentor for SAML authentication, currently using Forms Authentication. I am trying to deploy this application to AWS server instances while using Okta as the Identity Provider (IdP). The application runs smoothly in my local environment on AppStream, where I can debug it without issues. However, after deploying to the AWS server instances, I encountered the following exception
**********Inner Exception Type: System.Security.Cryptography.CryptographicExceptionInner Exception: The data protection operation was unsuccessful. This may have been caused by not having the user profile loaded for the current thread's user context, which may be the case when the thread is impersonating.Inner Source:

I identified this issue and follow this #427 and the issue was gone.

However, when accessing the URL https://my-app-aps.yyy.com/AuthServices/Acs, we encounter the following error. Interestingly, after refreshing the page multiple times, it eventually loads correctly

[CryptographicException: Error occurred during a cryptographic operation.]
System.Web.Security.Cryptography.HomogenizingCryptoServiceWrapper.HomogenizeErrors(Func`2 func, Byte[] input) +174
System.IdentityModel.Tokens.SessionSecurityTokenHandler.ApplyTransforms(Byte[] cookie, Boolean outbound) +179
System.IdentityModel.Tokens.SessionSecurityTokenHandler.ReadToken(XmlReader reader, SecurityTokenResolver tokenResolver) +793
System.IdentityModel.Tokens.SessionSecurityTokenHandler.ReadToken(Byte[] token, SecurityTokenResolver tokenResolver) +90
System.IdentityModel.Services.SessionAuthenticationModule.ReadSessionTokenFromCookie(Byte[] sessionCookie) +531
System.IdentityModel.Services.SessionAuthenticationModule.TryReadSessionTokenFromCookie(SessionSecurityToken& sessionToken) +266
System.IdentityModel.Services.SessionAuthenticationModule.OnAuthenticateRequest(Object sender, EventArgs eventArgs) +148
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +142
System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +75
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +93

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant