I need my MVC4 application to get the current domain user who is logged in on a machine that is automatically registered on my index.cshtml page.
the rest of the application works as intended, using the Authorize attribute, the security measures I need.
I just need to tell the application "get the current machine registered by the user, do not protect anything and do not deliver the user to the landing page."
web.config:
<authentication mode="Windows" />
like this, the user on the BLANK destination page.
If I try to put only [Authorize] on my action by index, then it asks for credentials, and then continues, as I want, without anything on the landing page.
Is there any way around this?
UPDATE:
No matter what you do, there seems to be no way to get around the login prompt and force the application to automatically get the current domain user and register it in the application.
source share