Comments (6)
I was not able to get it to work so i stopped using session and is now using HttpRuntime.Cache. I basically just replaced HttpContext.Current.Session[CacheId] with HttpRuntime.Cache[CacheId]. Seems to be working well.
from active-directory-dotnet-webapp-webapi-openidconnect.
Found the cause. ADAL add configureAwait(false) for all async method starting from version 3.13.0, which results to HttpContext.Current in NaiveSession becomes NULL because it is most likely in a new thread. You can use 3.12.0 version of ADAL which works fine.
from active-directory-dotnet-webapp-webapi-openidconnect.
Using HttpRuntime.Cache seems a better solution which doesn't have such thread issue. Thanks ttctilsted for sharing!
from active-directory-dotnet-webapp-webapi-openidconnect.
I am still having this issue, were you able to resolve it?
from active-directory-dotnet-webapp-webapi-openidconnect.
same here. what happened?
from active-directory-dotnet-webapp-webapi-openidconnect.
Closing as we are archiving this sample.
The newer one can be found at: https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/tree/master/4-WebApp-your-API
from active-directory-dotnet-webapp-webapi-openidconnect.
Related Issues (20)
- Scope claim always null HOT 1
- Manifest File Issues (2) HOT 2
- Requirement for using AntiForgery Tokens
- User's permission on applications HOT 4
- Use login_hint when acquiretokensilent fails HOT 1
- deploying problem on azure HOT 1
- Any chance of also providing this example for asp.net 5? HOT 1
- ReadMe Step 3: Number 11 HOT 1
- Cannot find the way to do the step Permission for your application; HOT 1
- Crash after upgrading Microsoft.IdentityModel.Clients.ActiveDirectory to latest HOT 11
- failed_to_acquire_token_silently HOT 5
- Cannot apply Roles to the backend WebAPI HOT 2
- Logout caused the infinite loop HOT 1
- ADFS On-premises sample HOT 3
- After user consent, get AADSTS 65005 Error HOT 1
- Cannot add Todo items and stuck in infinite loop HOT 1
- TodoListService will not build
- TodoListController throws exception when attempting to grab token to call TodoService HOT 2
- How to use Identity Roles from AD to authorize user against some API Controllers/Actions HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from active-directory-dotnet-webapp-webapi-openidconnect.