I have an silverlight application configured with windows integrated security.
I would like to emulate the "Sign in as different user" functionality
I would like to give the user, the option to click a button and show the
windows authentication login window, so that the user can enter the "User
name" and "Password" again using another domain account.
Is this possible and how?
(btw i found this question on another site but with no answers, I need the same thing so i copy/pasted a bit)
That's only doable if your ASP.NET application sends back 401.2 challenge to the browser. but the details are too complex, and you should avoid that if possible.
Forms authentication is a better option.
Related
I've an asp.net webforms application running on our intranet (same Active Directory).
I want to auto authenticate .
So i'm using on my C# code :
HttpContext.Current.Request.LogonUserIdentity.Name
to get user name and doing some stuff.
In my web.config i'm not specifying any authentication mode.
In IIS 10.0 in default website and also in virtual directory i've
The problem is that from my development PC it works well, but from any other pc's of my organization, Windows keep continue to ask for user and password.
What can it be ?
Thanks
As far as I know, the reason why you achieve the auto authenticate for your web application is the IE security setting.
If your customer doesn't enable this setting, the IE browser will not auto send the username and password to the server to login in the user. So you will face your customer need to type in the username and password.
To solve this issue, you should suggest client side to enable the security setting to auto login in.
More details about how to enable the auto log in you could refer to below steps:
1.Open the IE and find the internet options.
2.Modify the user authentication
I would like my ASP.net MVC5 application to authenticate against my active directory. Using "Windows Authentication" when creating my project works fine but I would like to do that same thing using a interface similar to "Individual user accounts". That way my users would be able to log out whenever they want and log in again as a different user. All I want is "Windows Authentication" but with a login form and a logout option.
I have tried everything but nothing seems to work, is this so difficult to do?
Thanks in advance for your answers
Windows Integrated Authentication uses Kerberos, so the Webserver (probably IIS) will handle the Authentication for you - your application does not have a chance to intercept this behavior.
But there is a way to do what you want:
http://msdn.microsoft.com/en-us/library/ff650308.aspx
I have configured my ASP.NET website to use windows auth (and disabled annon auth), and setup some authorization rules. The website is deployed on the Intranet and all users have a windows identity.
When a user navigates to the website, the typical "Windows Security" window pops up, asking the user for his identity. I want to disable this, since the user is already logged in with a domain account. The browser should submit the current identity and IIS can use this to auth.
Any ideas?
Note: I am using IE and the Enable Integrated Windows Authentication is checked
In which browser is this happening? Internet Explorer has an option that explicitly defines whether the browser tries to authenticate users automatically.
You can find it in Tools - Internet Options - Advanced - Enable Integrated Windows Authentication.
Where I've seen this symptom happening before, I've had to add the URL the website is on explicitly into the Local Intranet zone in IE.
I have an ASP.NET application using Windows Authentication.
At the moment the only way for a user to log-off the application is to close the browser (it is a pain because closing the tab itself is not enough).
I would like to have a log-off button so make it easier to log-in as a different user.
Is it possible at all (IE and/or Firefox)?
Thanks.
Found it:
ASP.NET Windows Authentication logout
You should use forms auth if you want to show good ui login, logout forms.
Via IIS you can verify ldap users.
I am trying to figure out how to implement an ASP.NET page with Windows Authentication without getting that annoying IIS login box.
I currently have 3 domains in my network so all the people logging in would have to prefix their user names with the domain. This is not user friendly. I would like to have a custom login page that would have a domain combo box.
Most examples I found implement this using Form security, however I need Windows Authentication since I want to connect to the SQL server using Integrated Authentication rather than a hard coded user name and password.
Does anyone know of a good article or sample code that shows how to implement this?
The following links to an article that explains how to authenticate a windows user using forms authentication, it uses a call to the native win32 api function LogonUser to acheive this. This way you can design your own custom login page with a drop down list to select a domain. Take a look, perhaps it will help.
Windows Authentication using Form Authentication
To get this setup so you don't have the authentication prompt, you are going to need to have the domains trust the accounts from one another. This article should get you pointed in the right direction:
http://technet.microsoft.com/en-us/library/cc787646%28WS.10%29.aspx