windows-authentication

Windows authentication with SignalR and OWIN self-hosting

北慕城南 提交于 2019-11-30 07:00:19
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. Ideally there'd be an NTLM owin middlware but since there is none you can work around it by getting a handle on the HttpListener and enabling auth that way (it's natively

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

て烟熏妆下的殇ゞ 提交于 2019-11-30 06:51:56
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 connected with SSMS. But, Holy Cow, after upgrading to Windows 7, I can no longer do this. Adding my

In IIS, why doesn't Window Authentication show up as one of the options for my web application?

自闭症网瘾萝莉.ら 提交于 2019-11-30 06:49:29
问题 I'm reading about how to set up windows authentication for my web application on IIS 7. In the description they have Window Authentication as an option in IIS. I have windows authenication turned on for my machine(I'm on Windows 7 Professional 64bit) and I still don't see it as one of the authentication options for my web application. Why? 回答1: I got hit by this and it was something as simple as having not started IIS Manager with 'run as administrator'. Very frustrating, but I got there in

IIS Express HTTP Error 401.2 - Unauthorized

好久不见. 提交于 2019-11-30 06:11:40
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" /> <iisClientCertificateMappingAuthentication enabled="false"> </iisClientCertificateMappingAuthentication>

Use Anonymous authentication in MVC4 on single controller when the whole application uses Windows Authenticaion

此生再无相见时 提交于 2019-11-30 05:52:55
问题 I have an MVC4 Web application which uses Windows Authentication, that is in web.config I have <authentication mode="Windows" /> And that works fine and everything is ok. However now I need a controller (an Web API controller in fact) that should be accessed anonymously from a third party component. The problem is that every time I want to invoke this method it requests user credentials. I tried putting AllowAnonymous attribute to controller and methods but it was not successful.

Using Windows Role authentication in the App.config with WCF

走远了吗. 提交于 2019-11-30 05:20:14
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 configuration for the role set in the app.config. Is there any way to do this and still be using windows

Web API 2.1 Windows Authentication CORS Firefox

我只是一个虾纸丫 提交于 2019-11-30 04:09:35
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 xhrFields arg to my jquery.ajax call: $.ajax({ type: method, url: serviceUrl, data: JSON.stringify(foo),

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

主宰稳场 提交于 2019-11-30 04:02:05
问题 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

MVC3 Windows Authentication override User.Identity

佐手、 提交于 2019-11-30 03:54:42
I am building a intranet application using MVC3 with a MSSQL backend. I have authentication and roles (through a custom roles provider) working properly. What I am trying to do now is overriding User.Identity to allow for items like User.Identity.FirstName. But I cannot find any code that will show me how do this in WindowsIdentity I have tried writing a custom provider: public class CPrincipal : WindowsPrincipal { UserDAL userDAL = new UserDAL(); public CPrincipal(WindowsIdentity identity) : base(identity) { userInfo = userDAL.GetUserProfile(identity.Name.Split('\\')[1]); this.identity =

ASP.NET Core and on premise AD authentication

和自甴很熟 提交于 2019-11-30 03:50:04
问题 I'd like to try and use ASP.NET Core MVC or Web API at my workplace but we have just Active Directory to authentication and authorization. Is there any solution to solve it with an on premise AD or we have to change for Java? I know this question is not original but I'd like to get a simple answer to it, please. 回答1: Microsoft has released pre-release version for System.DirectoryServices . You can get it from NuGet package manager using this command: Install-Package System.DirectoryServices