Home Access Plus+ Thread, Apostrophe in username preventing login in Projects:; Morning,
Been testing this out with a few users now without any issue (other than it seems really really slow, ...
16th April 2012, 10:03 AM #1
Apostrophe in username preventing login
Been testing this out with a few users now without any issue (other than it seems really really slow, any thoughts on that?) , but today I've increased the test userbase to include a few more members of staff and two of these users have apostrophes in their surnames and neither of them are able to login due to the apostrophes. When they try it comes up with :
'/Bookings/Booking[@username='co'sullivan']' has an invalid token.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Xml.XPath.XPathException: '/Bookings/Booking[@username='co'sullivan']' has an invalid token.
Everyone else is able to log in perfectly fine, just the two with apostrophes who are having the issue. I'm sure that somewhere I could just insert a line to replace the apostrophe with something else automatically? Anyone got a solution to this?
IDG Tech News
16th April 2012, 10:56 AM #2
it's never a good idea to have apostrophe's in usernames, especially with HAP+. I'll have a look if I can fix this, but it's not likely
16th April 2012, 11:05 AM #3
Yeah its a touch unfortunate, but their AD useraccounts have the apostrophes in and they get ever so irate if they dont have their names done "properly"
16th April 2012, 01:44 PM #4
Just from my experience, apostrophe's in usernames are a big no-no and i never really understood why Windows allows it. You will find issues with so many things.. Any references based upon the %username% will often fail when creating folders or files (which includes wierd back-end issues with Office apps etc). Web Services like the Microsoft Exchange Web Access wont handle it properly either.
What we do is remove all hypens and apostrophes from usernames, but leave it in the "Display Name". That way, Windows reports the properly spelled name for the user, but uses plain text username.
Google is littered with more examples of some big name products which won't play nicely with a Windows AD username containing an apostrophe:
Obviously, you aren't here for a lecture on how to run your own network, so i hope you won't think me rude for chipping in.
16th April 2012, 01:52 PM #5
No no, I dont think you're rude, I dont run the network, the apostrophe choice isnt one made by me, so no offense taken
16th April 2012, 02:19 PM #6
Is it just logging onto a workstation like Win 7?
I can login with a apostrophe in the username.
Win 7 * W2k8R2
16th April 2012, 02:29 PM #7
It's in a XPATH query.. I'm reasonably sure you can use double quotes in those to get around this e.g. [@username="o'heck"]. Might not be that simple in practice though, so over to Nick...
16th April 2012, 06:48 PM #8
can't use double quotes, it's a .net thing, but I'll look into it when I can, won't be soon as I'm dealing with a CC3 -> CC4 upgrade at the moment (first day with it in mass use tomorrow)
17th April 2012, 10:08 AM #9
Thanks to Jake from:
nickbro (17th April 2012)
17th April 2012, 06:33 PM #10
will look into it this weekend
By amfony in forum Windows
Last Post: 4th February 2009, 11:02 AM
By mactech03 in forum Mac
Last Post: 10th November 2008, 07:45 PM
By TechMonkey in forum Windows
Last Post: 30th April 2008, 02:33 PM
By kerlj001 in forum Coding
Last Post: 26th February 2008, 09:20 PM
By jayrt in forum Windows
Last Post: 29th March 2006, 11:54 AM
Users Browsing this Thread
There are currently 2 users browsing this thread. (0 members and 2 guests)