Print Page | Close Window

Active directory user cannot create new account

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=25641
Printed Date: 03 April 2026 at 5:37pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Active directory user cannot create new account
Posted By: msnyder
Subject: Active directory user cannot create new account
Date Posted: 22 April 2008 at 8:32pm
Ok so this is basically just happening on one physical computer. If this user logs in on a different machine everything works perfectly. But from his machine if he tries to go to the forums he gets this error. I have tried clearing his temp files, cookies, etc and it continues to happen. Any ideas anyone?
 
Server Error in Forum Application
An error has occurred while writing to the database.
Please contact the forum administrator.

Support Error Code:- err_SQLServer_windowsAuthentication()_add_new_user
File Name:- functions_windows_authentication.asp

Error details:-
Microsoft OLE DB Provider for SQL Server
Cannot insert duplicate key row in object 'tblAuthor' with unique index 'Username'.



Replies:
Posted By: WebWiz-Bruce
Date Posted: 23 April 2008 at 8:10am
I'm wondering if this could be a case issue that the username is in a different case to that stored in the database and so can not match up the user to an account and therefore attempts to add the user as a new user, but fails as the username is already in the database.

-------------
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: msnyder
Date Posted: 23 April 2008 at 1:55pm
I did check the database to see if the user was already in there and he is. I am assuming this is because he logged on from a different workstation. But his username should be the same on any workstation he logs in on as its all active directory. I am still unable to resolve this but am somewhat happy that it is only happening to my co-worker!


Posted By: WebWiz-Bruce
Date Posted: 23 April 2008 at 5:46pm
I would be interested to get to the bottom of this to findout why and if necessary make adjustments to the code.

If you edit the file functions/functions_windows_authentication.asp and place the following code at line 82:-

Response.Write(strAuthenticatedUser)

This will the display the users login name at the top of the page. If you then could try login in as this person from both locations and see if there is a difference in their usersname.

Once you have done this remove the code.


-------------
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: msnyder
Date Posted: 23 April 2008 at 6:12pm
Very interesting. When he goes to the site from his computer it logs his username as "Domain B\administrator", but when he logs in from any other computer it logs it as "Domain A\jsmith"


Posted By: WebWiz-Bruce
Date Posted: 23 April 2008 at 7:13pm
It could be that he is logging in as the domain administrator rather than under his own username.


-------------
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: msnyder
Date Posted: 23 April 2008 at 8:00pm
Well the Domain B account is definetely a domain admin account. But why it is trying to login as that I do not understand. He is absolutely logged into his machine as Domain A\jsmith. How would it be trying to login as domain B\administrator?


Posted By: WebWiz-Bruce
Date Posted: 23 April 2008 at 9:13pm
Web Wiz Forums just reads from the server the account the user is logged in under to browse the web site.

If for some reason the account that the user uses from that machine is the admin account to view the web site then this is what is read in from the server.


-------------
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: michael
Date Posted: 23 April 2008 at 9:59pm
Run a Trace on his traffic from PC to IIS. He could be getting proxied along the way or something similar.

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


Posted By: msnyder
Date Posted: 24 April 2008 at 4:20pm
This is driving me absolutely looney. I checked if he had a proxy enabled and there wasn't one. I am not suer how to run a trace on his traffic. I have confirmed several times that he is indeed logged in as himself and not the administrator, but the authentication function still insists on trying to log him in as an administrator in our other domain. The username its trying to insert based on Bruce's troubleshooting isn't even in the DB....


Posted By: michael
Date Posted: 24 April 2008 at 5:43pm
Not sure if this quite fits your issue, depends on whether you are running SQL Server on a seperate box; but take a look at the IIS Double Hop issue.It just takes Reporting Services as an example, should apply to other SQL Apps as well.
http://sqlblogcasts.com/blogs/stevechowles/archive/2007/07/03/reporting-services-2005-for-the-dba-double-hop-authentication.aspx




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


Posted By: msnyder
Date Posted: 25 April 2008 at 4:39pm
I figured out the problem this morning. Thank you all very much for your assistance. Basically what was happening is his machine had a cached credential for that server that it was authenticating with in leiu of his own credentials. Here is a brief description of what I did to resolve it:
 
1) Click Start, Settings, Control Panel, User Accounts.

2) Click the Advanced tab.

3) Click Manage Passwords.

4) Selected the cached entry for the Intranet site and removed it.
 
His machine is Windows XP SP2 by the way.
 
Thanks again for all your help guys!



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