windows-authentication

How to list domains running code from a non-domain computer?

柔情痞子 提交于 2019-12-11 06:41:42
问题 In my application I need to get Active Directory forest and list the domains hierarchy. I was given the Active Directory account that has necessary permissions. However my development computer is NOT on the domain and can not be added to the domain. Here is the code that I am using to get the forest and access the root domain: // I also tried to add a Global Catalog port: 192.168.2.11:3268, no success DirectoryContext dc = new DirectoryContext( DirectoryContextType.Forest, "192.168.2.11",

dotnet run - angular - windows authentication - not authenticated

大憨熊 提交于 2019-12-11 06:38:12
问题 When running angular with: ng serve --proxy-config proxy.config.js and .net core with: dotnet run windows authentication never authenticate user. However when running the application from Visual Studio F5 user is authenticated, (same port and everything). proxy.config.js const Agent = require('agentkeepalive'); module.exports = { '/api': { target: 'http://localhost:5000', secure: false, agent: new Agent({ maxSockets: 100, keepAlive: true, maxFreeSockets: 10, keepAliveMsecs: 100000, timeout:

User.Identity.Name sometimes blank with Windows authentication

孤街浪徒 提交于 2019-12-11 05:37:54
问题 My web app uses Windows authentication. All other authentication methods are disabled. It works at first; User.Identity.Name returns "MYDOMAIN\myuser." However, if I wait 131 seconds (yes, I timed it, though I'm not sure it always takes exactly that long) and reload the page, User.Identity.IsAuthenticated = false and User.Identity.Name = "". At this point I can just reload the page and it works again, for another 131 seconds of inactivity. Relevant parts of web.config: <authentication mode=

ASP.Net Httpcontext.Current.User shows last user who spawned thread

那年仲夏 提交于 2019-12-11 04:56:31
问题 Very strange issue I'm facing with ASP.Net and Current User. Using ASP.Net 4.0. For some reason, HttpContext.Current.User.Identity.Name reports the User Identity as the last person who hit the server. In other words, it somehow and for some reason caches the Identity. Heres the scenario: Log in on computer 1 with my own username and it shows fine. Log in on computer 2 with other username and it shows fine. Refresh Browser on Computer 1 and it shows computer 2 credentials!!! I've tried just

“Optional” windows integrated authentication for Internet Explorer

折月煮酒 提交于 2019-12-11 04:19:35
问题 I'm writing an ASP.NET (MVC 3) web app that's running in IIS 7. It will be accessed by intranet users, probably from the same Windows domain that the web server is in, and I'd like it to recognise the currently logged on Windows user whenever possible. However, I never want the browser to pop up the authentication dialog box. So, I want to use integrated authentication, but without bothering the user. If they're browsing in Firefox or their security settings don't allow automatic logon or

Accessing Windows Authentication Web Page from Raspberry pi Browser

試著忘記壹切 提交于 2019-12-11 03:36:55
问题 We have a web page that we want to access from a raspberry pi, however the webpage in question is protected with windows authentication. Is there any way to pass this authentication across from the Raspberry pi? 回答1: Iceweasel is a port of Firefox which supports NTLM authentication on the Raspberry Pi. As far as I know, that's currently the only actively updated browser that retains the authentication throughout a session. 回答2: Chrome supports ntlm http auth scheme, you can read more about it

How to Get Current User Principal

感情迁移 提交于 2019-12-11 03:32:25
问题 I want to use Windows Authentication and get User info such as Givenname, Surname, etc. I used UserPrincipal.Current in IIS and I got an exception, but IIS express looks fine. 回答1: I solved by using a Find Method: var domain = new PrincipalContext(ContextType.Domain); var currentUser = UserPrincipal.FindByIdentity(domain, User.Identity.Name); 来源: https://stackoverflow.com/questions/21538184/how-to-get-current-user-principal

WCF basicHttpBinding and proxy with windows authentication

喜欢而已 提交于 2019-12-11 03:31:55
问题 I have an application that connect to an external web service. The application works fine but with one client I can't get through their proxy. Since the proxy is configured on the computer i started with <binding useDefaultWebProxy="true" ... > With this I get the error message: The remote server returned an error: (407) Proxy Authentication Required. Then I tried to add: <security mode="Transport"> <transport proxyCredentialType="Windows" realm="" /> </security> but the error message did not

IIS 7 and Windows Authentication

只愿长相守 提交于 2019-12-11 03:19:02
问题 We have IIS 7 running on the Windows 2008 Server which hosts many intranet websites. We want to use windows authentication for the website and its url will be http://pay So, I add the C:\InetPub\pay folder and bind it to the IIS7. Disable the Anonymous Authentication mode. Enable the Windows Authentication mode. When I access the website http://pay from the other computer, I got the message that Unauthorized You do not have permission to view this directory or page using the credentials that

How can I get Vault to use Windows Authentication from NAnt?

牧云@^-^@ 提交于 2019-12-11 03:02:28
问题 I am wanting to perform a number of tasks in SourceGear Vault (V4.1.4) with NAnt (V0.86.3317.0). Is there any way we can get Vault to use Windows Authentication from NAnt to create the connection? The NAnt block I am using to initialise the vault connect is: <target name="InitialiseVaultSettings"> <echo>InitialiseVaultSettings</echo> <vaultsetloginoptions user="${vault.Username}" password="${vault.Password}" URL="${vault.Host}" repository="${vault.Repository}" /> <vaultsetworkingfolder