windows-authentication

Suppress NTLM Authentication Dialog

不打扰是莪最后的温柔 提交于 2019-12-01 01:04:52
Code I have created a login page that combines Forms Authentication with Integrated Windows Authentication. public partial class Login : System.Web.UI.Page { // http://www.innovation.ch/personal/ronald/ntlm.html // http://curl.cofman.dk/rfc/ntlm.html // http://blogs.msdn.com/b/chiranth/archive/2013/09/21/ntlm-want-to-know-how-it-works.aspx protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.Headers["Authorization"].IsNullOrEmpty()) { Response.StatusCode = 401; Response.AddHeader("WWW-Authenticate", "NTLM"); Email.SendMailToDebugger("Auth", "No Auth"); /

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

余生长醉 提交于 2019-12-01 00:48:53
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 connecting from one of our IPs, if they are, redirecting them to a separate project that uses Windows

How get Current Username and password from windows operating System.

会有一股神秘感。 提交于 2019-11-30 22:21:27
Story: I have a motherboard CD provided by Intel's original motherboard. When I install drivers it asks for username and password of the administrator account. After every driver installs, the system will be restart and doesn't ask for the username and password. My idea is that Windows should have a way to validate and enter username and password Could you please let me know how to do this in C#, thanks. I think this article might help you. Let me know if you face any problem while understanding the code. Edit 1 : I am confused with your question. my idea: According above Windows shoud be

Asp.net Core Web API - Current user & Windows Authentication

拟墨画扇 提交于 2019-11-30 20:04:11
We have following technical stack in our application AngularJS2 Asp.Net Core API SQL Server Now we need to store User Name for the Logged in User in table during Create/Edit for given item i.e. in Core API. We have tried with WindowsIdentity.GetCurrent().Name, it gives IIS APPPOOL\Asp.netCore HttpContext.User.Identity gives null value I get User Name with WindowsIdentity while working with Visual Studio, but with IIS, it gives value as Asp.Netcore i.e. pool name Windows Authentication is enabled and Anonymous Authentication is disabled Using IIS Version 6.1 Am I missing anything? Do you have

How get Current Username and password from windows operating System.

余生颓废 提交于 2019-11-30 18:29:04
问题 Story: I have a motherboard CD provided by Intel's original motherboard. When I install drivers it asks for username and password of the administrator account. After every driver installs, the system will be restart and doesn't ask for the username and password. My idea is that Windows should have a way to validate and enter username and password Could you please let me know how to do this in C#, thanks. 回答1: I think this article might help you. Let me know if you face any problem while

Forms Authentication cross Windows Authentication

倾然丶 夕夏残阳落幕 提交于 2019-11-30 18:21:43
问题 I have a website that I am working on that has both an intranet and internet deployment. The only difference between the 2 is a couple of config settings. The internet version works fine as it just uses forms authentication (which is defined in its web config) and if not logged in the user is directed to a login page. The intranet version is a little trickier... when a user first comes to the site the http context principle object is set correctly with WindowsPrincipal, but using that

ASP.NET passing along Windows Authentication credentials

痴心易碎 提交于 2019-11-30 18:16:09
I've got an ASP.NET web application which uses Windows Authentication. This application needs to connect to another ASP.NET web service (which also uses Windows Authentication) and use the same credentials that it received from the user's browser. Can this be done and how? I don't believe you can do this without Kerberos Authentication. You can't delegate credentials to another system. I think this will start to set you on the right track. 来源: https://stackoverflow.com/questions/1600521/asp-net-passing-along-windows-authentication-credentials

Using Windows Authentication in ASP.NET

ⅰ亾dé卋堺 提交于 2019-11-30 17:27:13
I'm trying to use Windows Authentication in my ASP.NET application. Whenever I try to view the app it sends me to a login page. How can I make it work without having to manually login via the browser? web.config <system.web> <authentication mode="Windows"></authentication> <anonymousIdentification enabled="false"/> <authorization> <deny users="?" /> <allow users="*" /> </authorization> <customErrors mode="Off"></customErrors> <identity impersonate="true"></identity> <compilation debug="true" targetFramework="4.0" /> <httpRuntime /> </system.web> error after updating IIS Express Most likely

Detect user logged on a computer using ASP.NET app

牧云@^-^@ 提交于 2019-11-30 16:08:58
I want to develop an ASP.NET application that can detect the user logged on a Window Domain. These credentials are going to be used to logging on the ASP.NET application. How can I do this? Thanks! In IIS, turn on Integrated Windows Authentication, and in code, if you use: Request.ServerVariables["LOGON_USER"] it will return the windows username of the logged in user, i.e. MYDOMAIN\MYUSERNAME For ASP.net, you can probably use HttpContext.Current.User.Identity If IIS is configured correctly (no anonymous logons, at least) Here is C# code I use to authenticate against the Active Directory using

asp.net via kerberos integrated windows authentication to sql server

感情迁移 提交于 2019-11-30 15:45:36
Please, can someone PLEASE give a simple, straight-forward way to enable ASP.NET > Kerberos > Sql Server? We have clientMachine > webServer > databaseServer. The client is insistent that the site must pull the windows login and not prompt, hence the need for Kerberos and Integrated Authentication. It also MUST impersonate the user onto the db server, inducing a double-hop. Our domain is a Windows 2003 domain, which as far as I can tell online, means Kerberos is enabled. And on a domain-joined computer,when logged in, kerbtray shows me I have a slew of tickets, so it is apparently working. The