windows-authentication

Configuring ASP.NET MVC app's IIS 7.5 Application Pool identity as login on SQL Server 2008 R2

…衆ロ難τιáo~ 提交于 2019-12-05 14:15:23
I am trying to use IIS 7.5 Application Pool identity as login on SQL Server 2008 R2 so that my ASP.NET web app can connect to the database... Using this approach worked fine on my local dev machine (IIS 7.5 and SQL Server 2008 R2 on same machine). However, when I try to set up the same on production (IIS and SQL servers are separate) I am unable to add "IIS APPPOOL\MyAppAppPool" login to SQL Server 2008 R2. Notice that in either case you cannot use "Browse..." when creating a login in SQL Server since "IIS APPPOOL\MyAppAppPool" user identity is dynamic (or "special")... Any ideas? Update: For

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

旧巷老猫 提交于 2019-12-05 12:24:25
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 (database, username, & password) in the Windows Registry. Unfortunately these really unfriendly auditors (bad

Where can I load the user information to the session in ASP.NET MVC 5 with windows authentication?

ε祈祈猫儿з 提交于 2019-12-05 08:32:29
I want to use the ASP.NET MVC 5 for my web app. I need use the windows authentication . If I use the windows authentication where is the best place for reading user information (userid and roles) and store its to the Session ? I have the method for getting the user information by username from the database like this: public class CurrentUser { public int UserId { get; set; } public string UserName { get; set; } public Roles Roles { get; set; } } public enum Roles { Administrator, Editor, Reader } public class AuthService { public CurrentUser GetUserInfo(string userName) { var currentUser = new

With windows authentication, The trust relationship between the primary domain and the trusted domain failed, when calling IsInRole

萝らか妹 提交于 2019-12-05 07:36:24
I have my asp.net web server setup to use windows authentication. It is authenticating just fine with my current logged in user. I can verify this by viewing ... HttpContext.Current.User.Identity.Name And I can verify that I am authenticated by viewing... HttpContext.Current.User.Identity.IsAuthenticated However, when I call the .IsInRole function I get the trust relationship error... HttpContext.Current.User.IsInRole("accounting") I have found online references to problems with supplying domain name with the role name (domain\accounting), but I still get the same error. Any suggestions on

OWIN Web API Windows Service - Windows Identity Impersonation

半城伤御伤魂 提交于 2019-12-05 07:30:04
问题 This is an intranet app. I have a WebAPI Owin selfhosting app running on a Windows Server under a service account. The Front end is AngularJS which talks to the database through this Web API. What I want is when any action is invoked on the API which requires database interaction, the user credentials are used to connect to the database, and not the service account itself. I am using Windows authentication, and I have enabled Ntlm authentication on the httpListener in the Startup class, and I

Double Hop Impersonation, Protocol Transitioning and Constrained Delegation in ASP.NET 4

…衆ロ難τιáo~ 提交于 2019-12-05 07:27:55
问题 I want to use IIS impersonation to connecto to a SQL server database as the user who is currently accessing a website. This is for auditing and security reasons. I've done some reading and discovered that because the SQL Server is on a sepearate physical server I need to enable Protocol Transitioning and Constrained delegation for the server that's running IIS. This is the article that I found ... http://msdn.microsoft.com/en-us/library/ff649317.aspx I didn't realise at the time I first read

How would an HttpModule for Custom Authentication interact with Windows Authentication?

老子叫甜甜 提交于 2019-12-05 06:27:49
I am trying to create a custom HttpModule which controls which users can view a site. I am trying to leverage Windows Authentication to do this. On an individual page, I would probably do something like this: if (HttpContext.Current.User.Identity.Name.Contains("jsmith")) { Response.Write("You do not have the correct permissions to view this site."); Response.End(); } But because I want to make this more configurable at the application level, I would like to use an HttpModule. Here is the start that I have made on the code: using System; using System.Web; public class CustomAuthHttpModule :

ASP.NET code to detect whether IIS “Windows Authentication” is enabled

*爱你&永不变心* 提交于 2019-12-05 01:59:17
I would like to be able to detect, from ASP.NET code, whether IIS currently has "Windows Authentication" "available"? Starting from my application installed and currently running under "Anonymous Access", I want to detect: "Windows Authentication" component has actually been installed in IIS (e.g. some IIS7 have it not installed by default); and... "Windows Authentication" is actually "Enabled" on my virtual root/location. I want this information to let the Administrator know whether he needs to take action in IIS before he actually attempts to switch it on on my application. (Hence, for

Mono to SQL Server with Windows Auth

前提是你 提交于 2019-12-05 01:57:48
Quick... How to use Windows Authentication to SQL Server with the Mono SQL Client running on Windows without a username+ password in the connection string? More... We have to use Mono to support multiple platforms for some components of our app This is an external limitation that we can't change We will run the components that access the database only on Windows The portability/OS-agnostic features of the Mono SQL Client add no value That is, any component running on non-Windows will not access the SQL Server database The process runs under some Windows user (real user, service account,

Node in Corporative Environment with NODESSPI

不打扰是莪最后的温柔 提交于 2019-12-05 01:42:55
问题 I developed a NODE API to serve data to Angular app. The original idea is to use NODESSPI for integrated authentication as we plan to run this on a corporative environment. CORS will be needed as the API Node will be hosted on a different domain. I'm struggling to use NODESSPI for integrated authentication of the $HTTP requests. To test it on my computer I've created a simple js file to instantiate a node server with express to run my angular app (I know it could be done without express, but