windows-authentication

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

限于喜欢 提交于 2019-12-22 08:28:28
问题 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

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

我怕爱的太早我们不能终老 提交于 2019-12-22 08:04:31
问题 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,

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

感情迁移 提交于 2019-12-22 05:10:46
问题 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

How to enable Windows authentication for specific controller in ASP.Net Web API

試著忘記壹切 提交于 2019-12-22 04:27:04
问题 I was wandering if there is a way to enable Windows authentication only for the particular action of the particular ASP.Net Web API controller. My Web API web service has a couple of controllers with numerous actions, but only one action of one controller needs Windows authentication. This web services is implemented using Web API 2.1, and is hosted in IIS (v7.5 and above). Even though, it’s an intranet web service I don’t want to enable windows authentication on controllers and actions that

Windows Integrated Authentication Conflict With MS-SQL 2000 DB Connection With Integrated Security

我怕爱的太早我们不能终老 提交于 2019-12-22 00:55:12
问题 We are developing an intranet web application on .NET 2.0 platform. The application is using Integrated Windows Authentication for Single Sign On. The users are authorized to use diffent modules according to the Active Directory Groups they are in. Up to the point where authentication and authorization is accomplished everything works fine. But the problem starts when application tries to connect to the database on MSSQL Server. According to the security policies of our customer, no database

IIS 8.5: Change authentification mode for url sub path

余生颓废 提交于 2019-12-21 22:02:12
问题 We have a client intranet web application running as a remote proxy on IIS 8.5 with Windows Authentication enabled. Now, we need to disable Windows Authentication and enable Anonymous Authentication on the URL sub path /api/ to make all data from this path publicly availailbe within the client intranet domain. Actually, the solution from chensformers (Add authentication to subfolders without creating a web application) sounds quite promising. However didn't get it to run yet as I am missing a

How to get current windows user in asp.net?

不想你离开。 提交于 2019-12-21 21:31:37
问题 I tried lots of code it Works successfuly in my local server. But I tried it to put remote server they get another strings such as IIS APPPOOL, "servername" .... I change to some settings in IIS manager but I failed. How can i get username in remote server I tried some codes like: System.Security.Principal.WindowsPrincipal= System.Threading.Thread.CurrentPrincipal as System.Security.Principal.WindowsPrincipal; string strName = p.Identity.Name; or string strName = HttpContext.Current.User

How to allow mixed-mode authentication in IIS 7.0

本秂侑毒 提交于 2019-12-21 17:04:29
问题 How do you back-door authenticate Windows users into a website using forms authentication running on IIS 7.0? 回答1: Create a separate page to handle windows logins. This page will authenticate the user and then set the Forms cookie for them. Then, add the page to the web.config to tell IIS 7 to use Windows authentication on that particular page. <configuration> ... <!-- this file captures the user and redirects to the login page --> <location path="Account/WindowsLogin.aspx"> <system.web>

ASP.NET Windows Authentication Impersonate Problem

一曲冷凌霜 提交于 2019-12-21 05:54:18
问题 In my previous questions I was asking how to use windows authentication within my application. That is now working, users can login with there account but I have one database access scenario I can't find anything on. Basically I will have several servers and here is the problem. On some servers they will have Windows Authentication accounts for the SQL Server database server, so using impersonate their credentials should be used. But I notice its a global setting in the web.config (not per

Why is Windows Authentication working from local to server, but not server to server?

∥☆過路亽.° 提交于 2019-12-21 04:29:12
问题 I have two sites, A and B . A consumes an API that B exposes, and B requires Windows authentication. Both sites live in Domain D . The API is consumed via HttpClient , and when site A is run locally, under my domain account (which is in Domain P ), access is granted. In this case, HttpClient is instantiated like so: using(var client = new HttpClient(new HttpClientHandler { UseDefaultCredentials: true })) When A is deployed to a testing server, the above results in a 401 Unauthorized response.