windows-authentication

Is client LocalSystem (SYSTEM) identified by target/server machine? and in which context?

我是研究僧i 提交于 2019-12-25 01:43:42
问题 [1] tells: "When you configure to use a particular account as the process identity, ASP.NET attempts to delegate that account. If it is a local account that is identical (including password) to a local account on a remote machine , delegation is possible. If such an account does not exist on the remote machine, to the network it appears as the Windows anonymous account (NT AUTHORITY\ANONYMOUS LOGON). In addition, delegation is also possible if the account is a domain account that has access

Use Windows Auth to authenticate user and then generate JWT in ASPNET Core 2.1

不羁的心 提交于 2019-12-25 00:09:02
问题 I have an ASP.NET Core 2.1 WebApi, in which I have implemented JWT authentication. The user calls api/authentication/authenticate , passes their username/password in the message body, and gets back a JWT in return which they then use to access the service. I also need the API to accept Windows authentication -- the user will call api/authentication/windows passing no user information, the service will check they are in the list of authorized users as listed in the web.config file (if I am

How can I detect Windows Authentication Prompts with Selenium web driver?

一世执手 提交于 2019-12-24 15:29:38
问题 I have a C# script to test some SharePoint sites. We are getting prompts to reauthenticate on some pages when using IE. (We suspect it is something to do with our F5 load balancer) I want to be able to create a script that can visit pages and then let me know if the page had a Windows Authentication Prompt? At the moment I don't need to login through the prompt just detect it. 回答1: You have to wait and catch the alert. driver.Navigate().GoToUrl("url_where_your_WAP_is"); WebDriverWait wait =

HttpContext.Current.User.Identity.Name returning null

梦想的初衷 提交于 2019-12-24 13:05:09
问题 The System.Web.HttpContext.Current.User.Identity.Name is returning "null." I am definitely logged in. How can this be solved? protected override void OnActionExecuting(ActionExecutingContext filterContext) { base.OnActionExecuting(filterContext); if (Session["FirstName"] == null) { string loginName = System.Web.HttpContext.Current.User.Identity.Name; string networkId = loginName.Split('\\')[1]; Session["FirstName"] = new AD_Utility().FirstName(networkId); } ViewBag.FirstName = Session[

Calling Web Service using Integrated Windows Authentication in Angular 2

狂风中的少年 提交于 2019-12-24 07:25:16
问题 I have got two applications. One is an ASP.NET Core Web API REST Web Service that is running at http://localhost:59944 and the other one is an ASP.NET Core application using Angular 2 running at http://localhost:63888/. I want to load JSON Data via the REST Web Service. Exception: Call to Node module failed with error: Response with status: 401 null for URL: Microsoft.AspNetCore.NodeServices.HostingModels.HttpNodeInstance+<InvokeExportAsync>d__7.MoveNext() Status Code 401 seems to be

Mixing Windows and Forms Authentication in ASP.NET MVC

狂风中的少年 提交于 2019-12-23 12:56:03
问题 I'm currently trying to set up a website that uses both windows authentication and forms authentication. I am using ASP.NET MVC and both IIS6 and 7 need to be supported. How would I go about letting known AD users into the app (their AD id is stored against their user record in the application database) and directing everyone else to a standard username/password page. 回答1: It seems the answer is no. We've had to set up 2 sites, the main application with forms authentication and a separate

DirectoryServicesCOMException (0x80072020) when using Active Directory from ASP.NET application

僤鯓⒐⒋嵵緔 提交于 2019-12-23 09:58:42
问题 Introduction I'm maintaining a legacy ASP.NET 3.5 application that queries Active Directory. The application uses "Integrated Windows Authentication" and is designed to connect to Active Directory using its own security context rather than a dedicated username and password. Here is the relevant code. using (DirectoryEntry root = new DirectoryEntry()) using (DirectorySearcher searcher = new DirectorySearcher(root)) { searcher.Filter = string.Format("(&(samAccountName={0})(objectClass=user)

IIS Windows Authentication weirdness

不羁岁月 提交于 2019-12-23 09:40:44
问题 I have a web server with two websites: a & b. a is production. b is testing/staging. Whoever wrote these apps before me relies on Request.ServerVariables("LOGON_USER") which is assigned when the user authenticates against the server via Windows Authentication. On a, this works great, on b there's some weirdness: I get my login prompt, but i can't use [domain]\myusername to login, I can do it with \\myusername though, same passwords (AD based). The IIS configs are identical as far as I can

WSO2 IS 5.3.0 - IWA authentication option not available

心已入冬 提交于 2019-12-23 06:11:19
问题 We are using WSO2 Identity Server for user authentication. We have upgraded from WSO2 IS 5.2.0 version to WSO2 IS 5.3.0. We are using the IWA (Integrated Windows Authentication) for user authentication for our applications. In WSO2 5.3.0 version we do not see the option to select IWA under the Authentication Type “Local Authentication” while registering the application under “Service Provider”. This option was available in WSO2 IS 5.2.0 and we were able to use it properly. Can you please let

ValidateCredentials() returns FALSE on First Call but TRUE on Subsequent Calls

柔情痞子 提交于 2019-12-23 05:49:33
问题 I'm using the following code to authenticate users on my web service: using (PrincipalContext context = new PrincipalContext(ContextType.Domain, domain)) { return context.ValidateCredentials(userName, password); } The obstacle I'm running into is that the first call to ValidateCredentials() is returning false but subsequent calls return true. I placed a breakpoint at this line and in the Intermediate window I see the same results: first call returns false, second returns true, even though