Comments (8)
Hi,
You got into an infinite loop due to disabling anonymous authentication, making the query string ever expanding! which caused the 404.15
error.
Both anonymous/windows authentication modes should be enabled, as the name implies (mixed).
Sorry! but I wasn't able re-produce your issue, if you can provide more details on the environment, configuration or code changes you have made!
from mvc5-mixedauth.
Hi,
When enabling both authentication, the infinite loop disapears.
But when I publish my solution on IIS Server, I'm not able to get my 'Domain\Username'. I only get 'IUSR' (which is the IIS user)
My configuration is 'DefaultAppPool', with Integrated pipeline.
from mvc5-mixedauth.
IUSR
is the default anonymous user account, the only case I found where LogonUserIdentity
contained IUSR
was when the user has already been forms authenticated. I'm still unable to re-produce your issue.
from mvc5-mixedauth.
Ok, I think I've made some modification to your code that break the MixedAuth...
My need is to automatically login a Windows user if an application setting is set in the web.config.
I change the Login method in the AccountController :
[AllowAnonymous]
public async Task Login(string returnUrl)
{
if (bool.Parse(ConfigurationManager.AppSettings["WindowsAuthentication"]))
{
await WindowsLogin(null, returnUrl);
}
ViewBag.ReturnUrl = returnUrl;
return View();
}
Is it OK ?
from mvc5-mixedauth.
No, its not OK. The WindowsLogin
action should be called only after the right identity exists inside Request.LogonUserIdentity
, See the request processing logic inside WindowsLoginHandler.
from mvc5-mixedauth.
Thank you, I'll look at your WindowsLoginHandler implementation.
So how can I identify automatically my Windows user without required them to click on the Windows Login button ?
from mvc5-mixedauth.
You can configure the solution to start by auto windows login, as described here #6 also Its found under WindowsFirst branch.
from mvc5-mixedauth.
Ok, it seems to work now without my modifications and with Windows first :)
Thank you four your reactiveness
from mvc5-mixedauth.
Related Issues (20)
- Automatic windows Authentication HOT 10
- Windowslogoff not found HOT 17
- Is it safe to upgrade to OWIN-MixedAuth? HOT 4
- WindowsAuth 404 on IIS 8.0 HOT 13
- can't catch WindowsLoginHandler HOT 4
- Custom check for windows authintication HOT 11
- Application check for windows authentication HOT 1
- Not working when on IIS 8.0 HOT 5
- WindowsFirst solution not working? HOT 2
- Logout not working HOT 1
- Where is the definition of GetWindowsLoginInfo? HOT 2
- 405.0 - Method not allowed HOT 3
- Where is "MVC5-MixedAuth.mdf" database file? HOT 1
- User Credentials promted keeps coming back HOT 8
- Where is MDF file? HOT 1
- Cookie Authentication - Time out event HOT 1
- Invalid Crendentials HOT 7
- Prompt for windows dialog box
- Authorize with Roles
- Use Policies with MixedAuth
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 mvc5-mixedauth.