I copied the code from the MVC sample and created the ashx inside my asp.net application (not MVC)
I got the valid token from authentication but the code throws an error at this line:
FederatedAuthentication.SessionAuthenticationModule.CreateSessionCookie(user);
Error: ‘FederatedAuthentication.SessionAuthenticationModule’ threw an exception of type ‘System.InvalidOperationException’
StackTrace = " at System.IdentityModel.Services.FederatedAuthentication.GetCurrentContextItems()\r\n
at System.IdentityModel.Services.FederatedAuthentication.GetHttpContextModuleMap()\r\n
at System.IdentityModel.Services.FederatedAuthentication.GetHttpModuleT.…
Can someone help me with this?
Million thanks!