windows-authentication

HttpContext.Current.User not populated with Windows Authentication enabled

假装没事ソ 提交于 2019-11-29 08:14:41
I have an asp.net intranet application using windows authentication. I created the application years ago with VS 2005, and the windows authentication bit was working perfectly. My web.config has the following (inside configuration -> system.web element): <authentication mode="Windows" /> <authorization> <deny users="?"/> </authorization> I test this in Firefox to confirm that the credentials are required, and indeed I'm prompted for my network credentials when first accessing the site, and I'm denied if they are invalid. However, when I try to access HttpContext.Current.User.Identity, the

Windows authentication with SignalR and OWIN self-hosting

半城伤御伤魂 提交于 2019-11-29 07:10:56
问题 I have a self-hosted SignalR application using OWIN . I would like to add Windows Authentication to the incoming requests. Is this possible? I believe that I can add e.g. Forms Authentication via something like this. However I can't find any way to use Windows Authentication to do something similar. My fallback plan would be to host in IIS instead, but I would prefer to be able to keep my app as a Windows Service if I can. 回答1: Ideally there'd be an NTLM owin middlware but since there is none

Can't connect to SQL Server in different domain using SSMS and Windows 7 Credential Manager

☆樱花仙子☆ 提交于 2019-11-29 06:57:25
问题 I need to connect to a SQL Server 2008 instance in another Windows domain to manage it. We only use Windows Authentication. In Windows XP, I could use the "Manage Network Passwords" feature to store on my local machine my username and password for the remote machine. Doing so would cause SQL Server Management Studio to use those credentials, instead of my local credentials, when connecting to that server. This worked great, and prevented my having to enter a username or password every time I

IIS7 Mixed Mode Authentication

独自空忆成欢 提交于 2019-11-29 06:45:42
We're getting ready to start migrating some of our IIS6 sites to IIS7, and the application currently uses Forms Authentication. We have started getting some requests from various sites to use the Windows Authentication for the users. While this is easy enough to implement (and I've shown internally that there is no issue with the app, as expected) the question then is how to continue to keep Forms authentication for when Integrated Windows doesn't work. I've seen several walkthroughs on how to have it configured on IIS6, and I could do the same thing on IIS7, but then I have to turn on Classic

IIS Express HTTP Error 401.2 - Unauthorized

微笑、不失礼 提交于 2019-11-29 05:51:19
问题 I have tried the suggestions in this post but I can not get Windows Authentication working with IIS Express in Vision Studio 2010. Now I get following error: Here are my applicationhost.config file entries: ... <add name="WindowsAuthenticationModule" lockItem="false" /> ... <authentication> <anonymousAuthentication enabled="true" userName="" /> <basicAuthentication enabled="false" /> <clientCertificateMappingAuthentication enabled="false" /> <digestAuthentication enabled="false" />

How can I run Internet Explorer Selenium tests as a specific domain user?

故事扮演 提交于 2019-11-29 03:25:20
I have a ASP.NET MVC website that uses Windows Authentication to control access. I would like to have a specflow selenium test that checks the configuration is correct by attempting to visit the site as a non-authorised user. As we're using domain accounts to control access there isn't a username/password login screen. The credentials of the current user are automatically passed to the site by the browser. So for my Selenium test I need to be able to run Internet Explorer as a specific user. I have found a number of articles about windows impersonation and I can switch to my test user during

Using Windows Role authentication in the App.config with WCF

試著忘記壹切 提交于 2019-11-29 03:24:24
问题 I am using a WCF service and a net.tcp endpoint with serviceAuthentication's principal PermissionMode set to UseWindowsGroups. Currently in the implementation of the service i am using the PrincipalPermission attribute to set the role requirements for each method. [PrincipalPermission(SecurityAction.Demand, Role = "Administrators")] [OperationBehavior(Impersonation = ImpersonationOption.Required)] public string method1() I am trying to do pretty much the same exact thing, except have the

Web API 2.1 Windows Authentication CORS Firefox

☆樱花仙子☆ 提交于 2019-11-29 01:33:23
问题 Here's the scenario: I created a web api project and an mvc project, like so: http://www.asp.net/web-api/overview/security/enabling-cross-origin-requests-in-web-api I installed CORS support via nuget and added the EnableCorsAttribute I ran the project and everything worked as expected (GET, PUT, and POST) across Chrome, IE, and FireFox. I then enabled Windows Authentication in the web api project (yes, i really need win auth in the api project). In order to get this to work, I added the

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

感情迁移 提交于 2019-11-29 01:19:11
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 IE and set a breakpoint in Global.asax.vb Application_AuthenticateRequest(), I get a null HttpContext

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

大兔子大兔子 提交于 2019-11-29 01:17:18
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 IE and set a breakpoint in Global.asax.vb Application_AuthenticateRequest(), I get a null HttpContext