Solved

ASP.Net Windows Authentication Question vs Forms Auth

Posted on 2013-05-15
2
415 Views
Last Modified: 2013-05-21
Hello all,

I should know this by now but I forget as I usually handle authentication via forms auth.   So we have a single sign-on type app where in IIS I have enabled Windows Auth only of course and disabled Anonymous.   I also have a sql table called User that allows us to have a user administration screen to select Active Directory users and it add that user to our user sql server table with Username etc.   So essentially I could take the User.Identity.Name and check that table because I want to setup custom roles for users and I also don't want to allow all users on the network to use the application.  

My question is if Window Auth is set in IIS that allows us to hit the site without having a login page but I don't want to allow everyone to hit the site without validating first against my user table.  

Is it common that once they hit the site you take the User.Identity.Name then validate against a SQL Server table of users then set in Forms Authentication cookie at that point?  This way any URL they hit within the site it is MVC based application so any route that hits the IIS box forms authentication would kick them out?  Confused on how to allow the user to access any URL based on Windows Auth.   I dont think forms auth would work anyway because you cant enable Anonymous on the IIS as well or the identity does not work.

Hope this makes some sense.
0
Comment
Question by:sbornstein2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Accepted Solution

by:
eguilherme earned 250 total points
ID: 39171083
Since anonymous is disabled, you could check the value of:
Request.ServerVariables("LOGON_USER")

Open in new window


and check against your user table to set/not set the forms ticket
0
 

Author Closing Comment

by:sbornstein2
ID: 39185723
thanks
0

Featured Post

Turn Insights Into Action

You’ve already invested in ITSM tools, chat applications, automation utilities, and more. Fortify these solutions with intelligent communications so you can drive business processes forward.

With xMatters, you'll never miss a beat.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question