473,770 Members | 6,105 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using Windows Authentication in ASP

I am creating an application that I would like to have the user type
in their User ID, password and domain, and it do Windows
Authentication to verify they are a valid user. Can someone provide
me with any assistance on this by sample code, or a pointer to a site
that goes over this? Thanks.

JR
Jul 22 '05 #1
5 1774
John wrote:
I am creating an application that I would like to have the user type
in their User ID, password and domain, and it do Windows
Authentication to verify they are a valid user. Can someone provide
me with any assistance on this by sample code, or a pointer to a site
that goes over this? Thanks.

JR


No code is required for this. Just turn on Windows Authentication and shut
off Anonymous access in your website properties using IIS Manager.

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 22 '05 #2
Don't think this is usable as I noticed I left off a piece of the
picture. I want to do a two part authentication. First they are
authenticated against the domain, and then second of course, it checks
to see in a table in the application if the user exists and if they
are active. I need something that can check what they type in is
valid, regardless of if they are physically on the domain or not and
have it pass back a 1 or 0 if the Windows Authentication was valid.
Then check in the application to also see if this user is value. May
do it the other way around since checking Windows Authentication if
the username they type in is not even in the application is really
pointless.

JR

"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcom> wrote in message news:<uK******* *******@TK2MSFT NGP15.phx.gbl>. ..
John wrote:
I am creating an application that I would like to have the user type
in their User ID, password and domain, and it do Windows
Authentication to verify they are a valid user. Can someone provide
me with any assistance on this by sample code, or a pointer to a site
that goes over this? Thanks.

JR


No code is required for this. Just turn on Windows Authentication and shut
off Anonymous access in your website properties using IIS Manager.

Bob Barrows

Jul 22 '05 #3
John wrote:
Don't think this is usable as I noticed I left off a piece of the
picture. I want to do a two part authentication. First they are
authenticated against the domain, and then second of course, it checks
to see in a table in the application if the user exists and if they
are active. I need something that can check what they type in is
valid, regardless of if they are physically on the domain or not and
have it pass back a 1 or 0 if the Windows Authentication was valid.


I don't know of a way to do both. You're either doing Windows
Authentication, in which case users MUST have domain accounts, or you're
doing Basic authentication. They're pretty much mutually exclusive.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 22 '05 #4
I was hoping there would be physical code that could do Windows
Authentication rather than relying directly on IIS. I want the user
to have to type in their username and password as in the event that
someone leaves their computer unlocked, someone could open a browser
and go to the site. Leaving out the second part of my security model,
is there any physical code that could be executed to use Windows
Authentication?

Thanks.

JR

"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcom> wrote in message news:<eZ******* *******@TK2MSFT NGP09.phx.gbl>. ..
John wrote:
Don't think this is usable as I noticed I left off a piece of the
picture. I want to do a two part authentication. First they are
authenticated against the domain, and then second of course, it checks
to see in a table in the application if the user exists and if they
are active. I need something that can check what they type in is
valid, regardless of if they are physically on the domain or not and
have it pass back a 1 or 0 if the Windows Authentication was valid.


I don't know of a way to do both. You're either doing Windows
Authentication, in which case users MUST have domain accounts, or you're
doing Basic authentication. They're pretty much mutually exclusive.

Jul 22 '05 #5
..NET includes Form Authentication

"John" <jr*****@yahoo. com> wrote in message
news:e6******** *************** ***@posting.goo gle.com...
I was hoping there would be physical code that could do Windows
Authentication rather than relying directly on IIS. I want the user
to have to type in their username and password as in the event that
someone leaves their computer unlocked, someone could open a browser
and go to the site. Leaving out the second part of my security model,
is there any physical code that could be executed to use Windows
Authentication?

Thanks.

JR

"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcom> wrote in message

news:<eZ******* *******@TK2MSFT NGP09.phx.gbl>. ..
John wrote:
Don't think this is usable as I noticed I left off a piece of the
picture. I want to do a two part authentication. First they are
authenticated against the domain, and then second of course, it checks
to see in a table in the application if the user exists and if they
are active. I need something that can check what they type in is
valid, regardless of if they are physically on the domain or not and
have it pass back a 1 or 0 if the Windows Authentication was valid.


I don't know of a way to do both. You're either doing Windows
Authentication, in which case users MUST have domain accounts, or you're
doing Basic authentication. They're pretty much mutually exclusive.

Jul 22 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
4840
by: Billy Jacobs | last post by:
I have a website which has both secure and non-secure pages. I want to uses forms authentication. How do I accomplish this? Originally I had my web.config file in the root with Forms Authentication set up and it worked just fine. Then I realized that I needed to have some pages unsecure. I then created 2 directories. One named Secure and the other named Public. I placed my web.config file in my
2
2424
by: YRao | last post by:
I am going to create intranet application using Windows Authentication using C# asp.net I am having following problem: 1 setting windows Authentication, it will validate for all users, user name and password from ADSI before entering into application this is working fine. Problem Is I am going to categorize users based on their Title properties value
4
4837
by: Dave | last post by:
Hi, Is there anyway to mimic forms authentication's loginUrl and RedirectFromLoginPage functionality using Windows authentication? We are developing intranet sites using basic authentication and we want to always redirect a user to a default 'splash' or welcome page that is set to anonymous if they are not logged in. This page would have
2
4628
by: Maziar Aflatoun | last post by:
Hi guys, I'm using Windows authentication to connect to SQL Server 2000. On my computer the connection is fine. Now if I move it to a remote server, how to I hard code my Username/Password in my connection string (using Windows NT authentication and not SQL Server authentication)? Thank you Maz.
2
1789
by: thechaosengine | last post by:
Hi eveyone, If anyone could advise on the following I would be truly greatful: I have a fairly standard set up. An IIS 5.1 website set up with anonymous access allowed in all areas of the site but a secure subdirectory called /secure/ I am using windows forms authentication and this is configured in my web.config file.
1
8182
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to the members of my organization. I think my problem is incorrectly setting the settings on my server or an authentication problem. Here is the code I have written to send a test message: -----Code Begins: Sensitive Information Replaced by -----...
1
2678
by: Andy | last post by:
Hi, I was wondering if someone could advise on if the following is possible. I have one website that is available to the public using Forms authentication and the Membership class, it creates/stores user information in a SQL Server 2005 db. I have another website that will administer the first website, allowing admins to look at all of the users in the db and see specific info from the database.The admin site is more secure than the...
3
2622
by: Jay-nospam | last post by:
Hi there, I am having trouble getting an ASP.NET web application to connect to another computer and passing the proper credentials and I hope someone can help me. I have a stand-alone Windows 2003 Server, ServerA, running as a Web Server that uses ASP.NET. The default.aspx file tries to access a file in a share on another computer, ServerB. ServerA and ServerB are on the same domain and are both running Windows 2003 Server.
3
13806
by: =?Utf-8?B?RGFuZGFuIFpoYW5n?= | last post by:
Now I have a web application, a web service and a SQL Server database. The Web application will invoke the web service, the web service invokes the SQL Server stored procedure. I let the web service run in an application pool which runs under a domain user, this domain user has permissions of accessing database and the connection to database is trusted connection. All these work well. The web application will be used in internet (not...
0
9425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10059
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8887
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7416
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6679
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5313
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5452
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2817
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.