windows-authentication

Wrong authentication after changing user's logon name

荒凉一梦 提交于 2019-12-04 22:46:50
We have a user who recently changed name. Let's say the old username was old.name and the new username is new.name. After editing the details in AD and logout/login with the new user name, our ASP.NET application shows the old name. Plain ASP.NET, no MVC, using Windows authentication. The code for getting the user name is: WindowsPrincipal wp = (WindowsPrincipal)HttpContext.Current.User; String userName = wp.Identity.Name.Substring(wp.Identity.Name.IndexOf("\\") + 1); This returns old.name, not new.name. I checked the IIS log files, these show the new name: 2011-04-05 11:41:44 W3SVC1 MARS 10

Windows Integrated Authentication Conflict With MS-SQL 2000 DB Connection With Integrated Security

青春壹個敷衍的年華 提交于 2019-12-04 21:14:08
We are developing an intranet web application on .NET 2.0 platform. The application is using Integrated Windows Authentication for Single Sign On. The users are authorized to use diffent modules according to the Active Directory Groups they are in. Up to the point where authentication and authorization is accomplished everything works fine. But the problem starts when application tries to connect to the database on MSSQL Server. According to the security policies of our customer, no database user or password data should be kept in connection strings or in registry even if encrypted. So we are

Identity Impersonation with ASP.NET 4 MVC not working as expected

谁说胖子不能爱 提交于 2019-12-04 19:33:03
I am in the process of building a Intranet MVC 4 application for our analysts. The goal is to allow internal users access to this application without having to sign on given they are part of our internal network. When they access the application I want to be able to capture their windows user name and check against the active directory using LDAP and retrieve the department they belong to and display the relevant details on the screen. Based on the advice from different fora, I have chosen Windows Authentication for this application and I was able to test the app successfully running from

Testing intranet site that uses Windows authentication

点点圈 提交于 2019-12-04 19:16:14
问题 I'm trying to develop an intranet app/website that uses Windows authentication. I'd like to test it with multiple users, for roles etc. At the moment I'm only using my own domain account. Is there a way I could simulate different users for the site? 回答1: As a picture is worth a thousand words here it goes how to do it in IE based on 2GDev's comment copied here for clarity: Go to Internet Options => Security => Local Intranet => Custom Level and change the User Authentication to "Prompt for

How to mix WIF and non-WIF endpoints in a single WCF <service>?

痴心易碎 提交于 2019-12-04 15:53:33
A WIF-based WCF service needs to call method FederatedServiceCredentials.ConfigureServiceHost() , or put the equivalent element <federatedServiceHostConfiguration> in the web.config file, to work. This is a setting on the service level, in other words it applies for all endpoints. According to the method documentation, the ServiceHostBase instance is modified in several WIF-specific ways. For example, the authorization is replaced by a WIF-based authorization class. Now I'd like to have a single <service> (inside <system.serviceModel><services> ) with multiple <endpoint> s, where one endpoint

HTTP Error 401.2 - Unauthorized for new site in a working app pool

霸气de小男生 提交于 2019-12-04 15:39:27
I am deploying a new EF 4.0 ASP.NET MVC 4 site to an IIS 7.0 server but I'm getting an error that says: "HTTP Error 401.2 - Unauthorized You are not authorized to view this page due to invalid authentication headers." I have Anonymous Authentication and Forms Authentication disabled. ASP.NET Impersonation and Windows Authentication are both enabled. I've confirmed that everything okay according to this Microsoft KB article Even better, there is already a working site in the same app pool using the same type of authentication. I'm not sure what to check next. Does anyone have an idea what's

BasicHttpBinding with TransportWithMessageCredential and clientCredentialType=“Windows”

我是研究僧i 提交于 2019-12-04 15:31:20
I am using this binding configuration on client and server: <basicHttpBinding> <binding name="BasicHttpBinding_IService1"> <security mode="TransportWithMessageCredential"> <transport clientCredentialType="Windows" /> </security> </binding> </basicHttpBinding> The client credentials seem to not be passed automagically (or are they?) this way like i assumed, so i need to know how to set them by myself. Will this even work? Anand You have to enable Windows Authentication on IIS . Look at the below link for how to do it. Also, I checked the MSDN web site, the key difference between your config and

Is ASP.NET Core Identity needed for Intranet app using Windows Authentication

孤人 提交于 2019-12-04 13:47:22
问题 Using Windows Authentication in an Intranet web application I want to achieve the following: Gather additional attributes from AD (name, employee number) Gather additional attributes from a database table (working hours, pay) Authorize based on application roles (not AD groups) Authorize based on an AD attribute (has direct reports) User not provide a username/password In my search for an answer it is suggested that I need to add ClaimsTransformation to my application: How do I use Windows

Need Users to Re-authenticate with NTLM

允我心安 提交于 2019-12-04 12:42:07
I'm NTLM (authenication="windows" in the web.config) with an asp.net mvc 2.0 site. Right now once a user logs in it keeps them logged in for weeks at a time. The use of the application is being opened up to users who share computers that use logged in service accounts. I need the site to reprompt each user for their AD credentials each time in order to handle these users. (Activity on the site must be linked to a uniquely identified user.) Thanks for any help that you can provide. Trey Carroll A way to do this is to handle the Http Authentication process using the HTTP 401 challenge . The

Windows Authentication not working in ASP.NET MVC 5 web app

[亡魂溺海] 提交于 2019-12-04 10:40:42
问题 I have an ASP.NET MVC 5 app and am trying to enable Windows Authentication. The development machine is Windows Server 2008 R2, IIS Express 8.0, Visual Studio 2013 & .NET Framework 4.5. I get a 404 Not Found error when ever I browse the app. The app enters a redirect loop with http://localhost:63455/Account/Login?ReturnUrl=%2F . Eventually the ReturnUrl ends up being very large as it gets appended to with each redirect. My web.config looks like this: <system.web> <authentication mode="Windows"