windows-authentication

What is the best approach for mixed-mode authentication on an ASP.NET intranet

╄→尐↘猪︶ㄣ 提交于 2019-12-10 11:44:25
问题 Building an ASP.NET intranet application which will authenticate domain users using Windows authentication so there is no need to login. Some users will be accessing the site over wifi and these users will not be authenticated on the domain. Therefore for these users only I need to present a login screen and authenticate them with AD using an LDAP connection (i.e. Forms authentication). I've been hunting around for a reliable solution. There are numerous SO questions (here, here, here, many

How to use Windows credentials to auto login Azure Active Directory managed applications instead of Single Sign-On

寵の児 提交于 2019-12-10 10:53:49
问题 After implementing the integration of Azure Active Directory and some other could applications like Salesforce, and syncing On-Premise Active Directory data by using Azure AD Connect, now I could auto login Salesforce and other cloud apps with Single Sign-On by using the credentials I used for desktop logon, but I still need to key in the credentials once when accessing Azure Applications page (Azure Portal). Is there any configuration in Azure I can change to support auto-login by using the

Can a Java application running on a Window's Server connect to SQL Server via Windows Authentication

半城伤御伤魂 提交于 2019-12-10 08:12:22
问题 Let me give some background before I ask my question. I’m at a shop that primarily runs Windows. We have several batch applications running on Windows Servers (mostly 2003). Most of these batch applications are written in C# and C++; however we have a handful of applications that are written in Java. The batch Java applications are connecting to a SQL Server 2005 database using JDBC. Please note we are not using an application server. Currently we store database connection information

SignalR not working with Windows-integrated authentication

六眼飞鱼酱① 提交于 2019-12-10 03:04:20
问题 I have an ASP.NET MVC 4 app (.NET 4.5) and SIgnalR works fine with forms-based authentication (hosted via IIS/IIS Express) As soon as I change the app to windows-integrated authentication ( <authentication mode="Windows"/> in "web.config") it stops working. jquery.signalR-2.2.2.min.js:9 WebSocket connection to ws://localhost:51030/signalr/connect?transport=webSockets&blhablahblah failed: Error during WebSocket handshake: Unexpected response code: 403 After adding the [Authorize] attribute to

Wrong authentication after changing user's logon name

倾然丶 夕夏残阳落幕 提交于 2019-12-10 00:53:21
问题 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,

Windows Authentication works in IISExpress but not in IIS

六眼飞鱼酱① 提交于 2019-12-09 23:10:48
问题 I am having an odd issue. I am using the newest MVC5 in Visual Studio 2013. I am trying to create a site that hosts an anonymous API as well as an Admin dashboard that requires intranet domain credentials through Windows Authentication. Everything works when running through IIS Express like I expect but not when hosted in real IIS. When hosted in real IIS it gives me a logon box like I expect for the Admin portion but it doesn't take my logon and keeps prompting me. I know it is the right

BasicHttpBinding with TransportWithMessageCredential and clientCredentialType=“Windows”

那年仲夏 提交于 2019-12-09 20:02:28
问题 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? 回答1: You have to enable Windows Authentication on IIS . Look at the

Handling Windows authentication with Selenium Webdriver

怎甘沉沦 提交于 2019-12-09 13:36:48
问题 Selenium Webdriver based test in C# must login with windows authentication. I have tried a couple of approaches: _Driver.SwitchTo().Alert(); _Driver.FindElement(By.Id("UserName")).SendKeys("LynnTest"); _Driver.FindElement(By.Id("Password")).SendKeys("Welcome1!"); _Driver.SwitchTo().Alert().Accept(); _Driver.SwitchTo().DefaultContent(); and IAlert alert = _Driver.SwitchTo().Alert(); alert.SendKeys("LynnTest\\t"); alert.SendKeys("Welcome1!"); _Driver.SwitchTo().Alert().Accept(); _Driver

Windows authentication using phantomjs

不想你离开。 提交于 2019-12-09 11:50:36
问题 I'm looking into phantomjs as a possible solution for UI automation in my latest project, but I can't seem to get windows authentication to work properly. I've tried setting the page.settings.userName and page.settings.password , but the snippet below always gets a 401 and the underlying stack makes no effort to resolve it. My search-fu has failed me, so I come to the community to ask for help. var page = require('webpage').create(); page.onResourceReceived = function(response) { phantom.exit

HttpContext.Current.User.Principal vs WindowsIdentity.GetCurrent()

我与影子孤独终老i 提交于 2019-12-09 09:01:39
问题 What's the difference in an asp.NET environment with Windows Authentication and Identity Impersonation turned on, between HttpContext.Current.User.Principal and WindowsIdentity.GetCurrent()? 回答1: According to this forum on WindowsIdentity.GetCurrent().Name vs. User.Identity.Name: User.Identity.Name represents the identity passed from IIS. WindowsIdentity.GetCurrent().Name is the identity under which the thread is running. Depending on your app's authentication settings in IIS, they will