I am developing one of application that requires authentication mode as a "Windows Authentication". I have choose "Windows Authentication" while creating new MVC 5 project.
But problem is that while running application, it always prompts for username/password for windows authentication.
Is there any way so that I can logged in automatically in all browser without prompting for credentials?
Also how can I switch user fro logged in user to another user?
Check this site, on how to enable auto login in browser by updating its settings:
Thank you raju for reply.
I have checked all the links. However I am wondering that is there any other way which we can handle programatically and works in all browser ?
As there can be no. of users of intranet application and it is not feasible to apply browser settings for all of them.
is there any other way which we can handle programatically and works in all browser ?
I doubt that, u can do it programmatically. since its not allowed from webpage.
but u may try to create a small win app. which configures a browser when run in a system.
if doubt even with this approach, as u may not find useful resource and may be there is no provision for such automation.
Actually when we creating any project using Visual Studio-2010,2012 which uses windows authentication, there is one option which can be find at below path.
Right Click on Project –> Properties –> Web –> Servers –> NTLM Checkbox.
When we clear this checkbox value, solution works well and for all the browser user logged on automatically without prompting password.
Can you tell me where I can find this checkbox in Visual Studio 2013?
You can find description here
Check this site:
Actually I am not getting this option in VS-2013. I have seen the way described in link.
Do you have any idea how to implement the way ?
Thanks for your post.
You can try modified your applicationhost.config file. The file was saved in the "My DocumentsIISExpressconfig" folder.
It seems that VS2013 was ignoring your web.config file and applying different authentication methods.
You had to modify this portion of the file to look like the below. You only modified the anonymousAuthentication to be false and the windowsAuthentication mode to true.
<authentication> <anonymousAuthentication enabled="false" userName="" /> <basicAuthentication enabled="false" /> <clientCertificateMappingAuthentication enabled="false" /> <digestAuthentication enabled="false" /> <iisClientCertificateMappingAuthentication enabled="false"> </iisClientCertificateMappingAuthentication> <windowsAuthentication enabled="true"> <providers> <add value="Negotiate" /> <add value="NTLM" /> </providers> </windowsAuthentication> </authentication>
Hope this can be helpful.
Thanks for the reply. I have tried the way you suggested and still it prompts for windows credentials popup.
I am running project from VS-2013 and windows credentials are asked only in "Firefox". In IE-11,Chrome browsers are detected current logged in user automatically.
Also I have tried one more thing.
I have created same project in VS-2010 and as I described earlier, Go to –> Project Properties Page –> Web –> Servers. In VS-2010 I am seeing "NTLM Authentication Checkbox".
When this checkbox is unchecked, all browsers are automatically detected logged in user. Because projects created from VS-2010 default use temp IIS(Created in windows task bar at bottom right with yellow color), it do not asks for username/password.
When I change VS-2010 project to use IIS Express, it again starts to prompt for user/name password.
Any idea whats going wrong?
In addition, settings which I applied in VS-2010 will applicable during actually hosting project in IIS?
Hope for some reply on this.
Many thanks again.
Did you got the chance to see my last inputs?