windows-authentication

Solution to avoid double-hop from client > web service > SQL Server

有些话、适合烂在心里 提交于 2019-12-19 09:02:38
问题 My project invoves a user connecting from client to web service, and then web service to SQL Server. The web services and SQL Server are on separate machines. Because of security requirements, we cannot used mixed mode in SQL Server, only Windows authentication. We are experiencing the "double-hop" issue between web service and SQL Server. We are using NTLM authentication and do not want to configure Kerberos because of the overhead and learning curve. We also don't want to have the web

A better way to get a Windows Username using Forms Authentication?

喜欢而已 提交于 2019-12-19 04:14:25
问题 I've inherited a project that uses forms authentication, but a recent feature request requires me to get the Windows username of some users. It's a website that uses Forms authentication (and I do NOT want to change this, it would be too much work at this point) but I have had a feature request to allow our internal users to login more easily (usually without having to put in their password or username). My current method is HORRIBLE, it involves checking the ip address to see if they're

401 - Unauthorized in IE7 only with windows authentication.

夙愿已清 提交于 2019-12-18 16:57:45
问题 I've created an intranet site that uses windows authentication In chrome I can access the site instantly, and in FF it requires Active Directory login. But with IE7 I'm getting the following error: 401 - Unauthorized: Access is denied due to invalid credentials. You do not have permission to view this directory or page using the credentials that you supplied. Im unsure as to why its okay in other browsers but not IE? Any help appreciated. Thanks 回答1: Solution: IE is using Kerberos and not

Remove NEGOTIATE from WindowsAuthentication in IIS

一笑奈何 提交于 2019-12-18 13:31:48
问题 I have a site running in IIS 7.5 that is accessed using a DNS alias different from the actual server name. In IE 8, integrated authentication is failing, but in Firefox and Chrome everything works fine. (IE presents a credential challenge a few times, then displays a 401.1 error page.) I have figured out that this is due to IE using Kerberos (aka "Negotiate") over NTLM, and Kerberos requires registering a Service Principal Name (using SETSPN) so that the mismatch between the DNS name and the

cntlm proxy with phantomjs

本秂侑毒 提交于 2019-12-18 13:26:57
问题 I'm trying to use the cntlm proxy on my windows machine to talk to a local web application on IIS that uses Windows Authentication from PhantomJS. To create the proxy, I'm doing: cntlm -v -u username@domain -p password -l 1456 localhost:80 My app lives at localhost/myapp To test whether or not this works, I try to browse to localhost:1456/myapp but I always get an auth challenge and no sensible username/password combination seems to work. Any thoughts on why this setup might not be working as

How do you find the users name/Identity in C#

自古美人都是妖i 提交于 2019-12-18 05:37:56
问题 I need to programatically find the users name using C#. Specifically, I want to get the system/network user attached to the current process. I'm writing a web application that uses windows integrated security. 回答1: The abstracted view of identity is often the IPrincipal / IIdentity : IPrincipal principal = Thread.CurrentPrincipal; IIdentity identity = principal == null ? null : principal.Identity; string name = identity == null ? "" : identity.Name; This allows the same code to work in many

HttpContext.Current.User is null even though Windows Authentication is on

試著忘記壹切 提交于 2019-12-18 03:06:22
问题 In IIS7 under Windows Server 2008, I have a virtual directory with anonymous access off and Windows authentication on. In my web.config, I have: <authentication mode="Windows"/> <authorization> <allow roles="MYGROUP"/> <deny users="*"/> </authorization> and <system.webServer> <!-- IIS7 security settings --> <security> <authorization> <add accessType="Deny" users="*"/> <add accessType="Allow" roles="MYGROUP"/> </authorization> </security> </system.webServer> Yet when I access default.aspx from

How to pass Windows Authentication credential from client to Web API service

你说的曾经没有我的故事 提交于 2019-12-17 18:39:22
问题 Inside my corporate environment, I have IIS7.5 hosting both a Web API service and a separate website which makes calls into that service via the RestSharp library. Both are currently configured with Windows Authentication. If I navigate to either one with a browser, I'm prompted to enter my windows credential, and everything works great... I get web pages that I want and the REST service spits out my data. The part I'm struggling to figure out is how to use a single credential to

WCF REST client windows authentication

↘锁芯ラ 提交于 2019-12-17 17:18:43
问题 I am following below example but getting Unauthorized 401 error on server side. https://www.dotnetcurry.com/ShowArticle.aspx?ID=434 I tried below WCF REST Service with Windows Authentication and SSL WCF Windows authentication issue with REST service This is close to mine how to consume wcf rest service with windows authentication I have IService interface like below [OperationContract] [WebInvoke( Method = "POST", UriTemplate = "/Students/getStudents", BodyStyle = WebMessageBodyStyle.Bare,

Connect To SQL Server With Windows Authentication From A Linux Machine Through JDBC

懵懂的女人 提交于 2019-12-17 15:44:44
问题 I want to be able to connect to a SQL Server using jdbc and windows authentication. I saw some answers on the internet saying i should add the following property to the connection string: integratedSecurity=true; And also add sqljdbc_auth.dll To the java path. But this, as far as i understand applies only when i'm connecting from a Windows machine. When i try this on a Linux machine i get: java.sql.SQLException: This driver is not configured for integrated authentication My question is how do