Print Page | Close Window

Windows Authentication - mod ?

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=305
Printed Date: 07 April 2026 at 1:17pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Windows Authentication - mod ?
Posted By: dorje
Subject: Windows Authentication - mod ?
Date Posted: 18 February 2003 at 10:07pm

I assume this has been asked before but searching on "NT authentication" or "windows authentication" only turns up two posts, unrelated to my question.

Question - has anyone created / heard of a mod for web wiz which provides windows authentication rather than forcing users to create a web wiz account.

I'm keen to avoid reinventing the wheel - but will try to come up with some beta code if it doesn't exist.

My goal is seamless user experience, in a windows environment. Mainly as the information held by web wiz will be a duplication of information already held by Active Directory or employee database.

Thanks for your comments




Replies:
Posted By: WebWiz-Bruce
Date Posted: 19 February 2003 at 6:14am

I altered version 6.x in about 20 minutes to work with Windows Authentication.

What I did was make change the code field in the author table to hold the NT password, then in the common.asp file where the cookie containing the users code is read in changed it to read in the NT password which was then matched up with the code field in the database.

This is the line I changed:-

'Read in users ID number from the cookie
'strLoggedInUserCode = Trim(Mid(Request.Cookies("Forum")("UserID"), 1, 44))

strLoggedInUserCode = Trim(Request.ServerVariables("AUTH_USER"))



-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: WebWiz-Bruce
Date Posted: 19 February 2003 at 6:15am
The same type of thing would work in version 7.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: Corobori
Date Posted: 20 August 2003 at 10:36pm

Originally posted by -boRg- -boRg- wrote:

What I did was make change the code field in the author table to hold the NT password, then in the common.asp file where the cookie containing the users code is read in changed it to read in the NT password which was then matched up with the code field in the database.

boRG, no problem with changing the code but I don't grasp the meaning of "make change the code field in the author table to hold the NT password".

Any thanks for your forum, it looks good so far and was ready to set up,

Cheers from Chile,

jean-luc



Posted By: MadDog
Date Posted: 20 August 2003 at 11:26pm
is it possible to add users to windows authentication with asp?

if so it would be a cool mod to make where people can sign up and it would create a login. then people can login using windows authentication.

-------------
http://www.iportalx.net" rel="nofollow">


Posted By: Bunce
Date Posted: 21 August 2003 at 3:21am

yes. Search for ADSI at MSDN. Plenty of examples on interacting with Active Directory through code.

Make sure you have sufficient permissions and know what you are doing!



-------------
There have been many, many posts made throughout the world...
This was one of them.


Posted By: Corobori
Date Posted: 21 August 2003 at 7:18am

MadDog,

You may also have a look at http://www.aspuser.com/ - http://www.aspuser.com/



Posted By: Corobori
Date Posted: 21 August 2003 at 1:31pm

Originally posted by -boRg- -boRg- wrote:

'Read in users ID number from the cookie
'strLoggedInUserCode = Trim(Mid(Request.Cookies("Forum")("UserID"), 1, 44))

strLoggedInUserCode = Trim(Request.ServerVariables("AUTH_USER"))

I must be missing something here because when I am using the Trim(Request.ServerVariables("AUTH_USER")) the strLoggedInUserCode will contain the User's name but when using Trim(Mid(Request.Cookies("Forum")("UserID")  it contains the actual User_code you're using.

The part which confused me the most is when you're saying "users code is read in changed it to read in the NT password".

Well, all in all my question is that if anybody managed to get it working. Any clue welcome.



Posted By: michael
Date Posted: 21 August 2003 at 1:52pm
I did a somewhat different approach some time ago. I place a small piece of code onto the header.asp/ where it checked, does the NT Users exist in the database? If yes, use that as the login user, if not forward to another page to automatically create that account leaving password empty. This is very much in a nutshell and I can see if I can find the code I used. I personally would feel uncompfortable storing the NT password in the database.

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: Corobori
Date Posted: 21 August 2003 at 2:11pm

I got it working,

I just changed this line:

strSQL = strSQL & "WHERE " & strDbTable & "Author.User_code = '" & strLoggedInUserCode & "';"

To this one:

strSQL = strSQL & "WHERE " & strDbTable & "Author.Username = '" & strLoggedInUserCode & "';"

On the top of what boRG said. Of course there is no audit around !



Posted By: Dan1el N1el5en
Date Posted: 31 October 2003 at 6:09am

Michael can you tell us how ?

 

And to the rest of the discussion: I've tried and tried...both the two lines mentioned here and a edit in Register.asp

But nothing works other than the members tables have been emptied and noone can log in (luckly in my test forum)



Posted By: wongpuikee
Date Posted: 09 February 2004 at 1:08pm
can anyone can create the mod to solve the above problems, pls help!!!!


Posted By: michael
Date Posted: 09 February 2004 at 6:37pm
Please do not dig out old posts. Do a search there is a mod already.

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net