windows-authentication

How to obtain email address with window authentication

只愿长相守 提交于 2019-11-28 09:14:30
问题 I am designing a web application using the ASP.net MVC framework. I would like to use Windows Authentication and do Role Checks using the Role Manager SQLRoleProvider. How can I determine the email address of the current logged on user? Is this even possible? The application will be deployed in a multi-domain intranet, if that matters (which I assume it does). Thanks for any help! 回答1: You can look up the user's properties in Active Directory. Here is a great article that explains how to do

windows authentication not working in ie7

回眸只為那壹抹淺笑 提交于 2019-11-28 06:32:47
Really need help with this and tried lots of things and run out of ideas. I have a site hosted on an internal development server, accessible for staff internally. the server setup is windows 2008 R2, iis 7.5 sql 2008 express. Im authenticating using active directory. in Chrome the site loads, and automatically logs me in recognising my name. When viewing the site in IE7 the response is: "401 - Unauthorized: Access is denied due to invalid credentials. You do not have permission to view this directory or page using the credentials that you supplied." I have tried the following: in iis set only

ASP.NET MVC How to create a custom role provider

倖福魔咒の 提交于 2019-11-28 06:05:19
Being relatively new to ASP MVC, I'm unsure which would better suit my needs. I have built an intranet site using Windows authentication and I'm able to secure controllers and actions using the Active Directory roles, e.g. [Authorize(Roles="Administrators")] [Authorize(Users="DOMAIN\User")] public ActionResult SecureArea() { ViewBag.Message = "This is a secure area."; return View(); } I need to define my own security roles independent of the AD roles. The desired functionality is that authenticated users are granted access to specific actions according to one or more roles associated with

'Login as another user' MVC 4 Windows Authentication

旧街凉风 提交于 2019-11-28 05:32:56
I have an intranet project written in MVC 4 which uses Windows Authentication to authorise and authenticate users. I need to add a 'Login as another user' functionality. After some searching I found this solution which suggests returning a 401, and created the following Action (which is called using a form): // // POST: /Home/LogOut [HttpPost] [ValidateAntiForgeryToken] public ActionResult LogOut() { return new HttpUnauthorizedResult(); } The Action gets called, and the browser pops up a username and password window, however as the result redirects back to the Action, a 401 is always returned.

Windows authentication failing in IIS 7.5

妖精的绣舞 提交于 2019-11-28 05:23:08
I'm building a simple internal application for my company, and it requires Windows Authentication for security. All other authentication modes are disabled. I'm stuck in a situation where internet explorer prompts for credentials 3 times, then fails with this error: Not Authorized HTTP Error 401. The requested resource requires user authentication. I then created a bare-bones website to test this out. I created a new site in IIS, put it on its own port (:8111, chosen at random), put one static "default.htm" file in there, disabled anonymous authentication, then enabled windows authentication.

Client-server authentication - using SSPI?

浪尽此生 提交于 2019-11-28 05:21:14
I'm working on a client-server application and I want the client to authenticate itself to the server using the user's logon credentials, but I don't want the user to have to type in their user name and password. I certainly don't want to be responsible for securely handling passwords. I only need the user to prove to me that they are who they say they are, and then my server can go ahead and grant/deny commands as it pleases. My users are part of a domain, and so I want to be able to use the logon credentials they created when they logged in. I'm not using any sort of web services, nor do I

Kerberos: kinit on Windows 8.1 leads to empty ticket cache

江枫思渺然 提交于 2019-11-28 05:19:07
问题 I installed Kerberos for Windows on a new set-up Windows 8.1 machine. Domain: not set Workgroup: WORKGROUP I edited the krb5.ini file in C:\ProgramData\MIT\Kerberos5 directory like this: [libdefaults] default_realm = HSHADOOPCLUSTER.DE [realms] HSHADOOPCLUSTER.DE = { admin_server = had-job.server.de kdc = had-job.server.de } After a restart, I made a kinit -kt daniel.keytab daniel to authenticate me against the Realm via console. Also getting a ticket by user and password via the Kerberos

No OWIN authentication manager is associated with the request

杀马特。学长 韩版系。学妹 提交于 2019-11-28 04:37:16
After trying to enable owin & AspNet Identity to my Web Api project (in VS 2013 + .Net 4.5.1) I get the following error in each valid or unvalid(request to none exist controller) requests : <Error> <Message>An error has occurred.</Message> <ExceptionMessage> No OWIN authentication manager is associated with the request. </ExceptionMessage> <ExceptionType>System.InvalidOperationException</ExceptionType> <StackTrace> at System.Web.Http.Owin.PassiveAuthenticationMessageHandler.SuppressDefaultAuthenticationChallenges(HttpRequestMessage request) at System.Web.Http.Owin

IIS7 and Authentication problems

大城市里の小女人 提交于 2019-11-28 04:11:37
问题 i've got a stock standard ASP.NET web site, deployed to our development machine (internal machine in our server room). Now, this dev site can be accessed by both INTERNAL and EXTERNAL users. Now, in IIS6 we used to have it so that Anonymous Authentication was turned off and something else was turned on .. giving the users a popup model box for username and password. I think they had to type some username or password that was defined in a web.config file? (not their website account username

App pool identity versus impersonation identity?

为君一笑 提交于 2019-11-28 02:40:32
问题 I found only one thread relating to this but it did not answer the question. I'm curious to a link or explanation of the difference between setting an impersonation user via in the web.config versus setting the application pool identity in IIS. They seem to be independent and am confused on the detailed differences. Thanks. 回答1: Using impersonation in the web.config allows you to override whatever identity was configured for the Application Pool the app is running under - it's just a more