-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
ASP.NET Core Windows Authentication except specific paths #2913
Comments
A sample will be provided as part of https://github.com/aspnet/AuthSamples/issues/15 You're using IIS, correct? In IIS enable Windows and Anonymous. Then on all of your controllers that require auth specify |
It seems that isn't enough - what about classes which we Inject into our views? in this class we make database calls with RunImpersonated like this:
I can specify [Authorize] for this class but it seems this doesn't work - there is always a error in the line: we use IISExpress with VS 2017 and targeting NET 4.6.2 Robert PS: isn't it possible to have only Windows authentication and use [AllowAnonymous] on specific Controllers/Actions to allow without authentication? |
The authorize attribute goes on you mvc controller class. Or are you using razor pages instead? |
solved it now - set the following to have authorization on every Controller
and use [AllowAnonymous] for those where I don't need it |
Is there a way to authenticate to active directory by using a form instead of the default pop-up form with username and password that prompts anytime youre opening the app? |
in our ASP.NET Core solution we use Windows Authentication but for one path we need anonymous Access because it is the path for the WOPI Access from Office Online Server like api/wopi/files/{id}
is there a possibility to except specific paths in ASP.NET CORE with Windows Authentication?
robert
The text was updated successfully, but these errors were encountered: