+ Post New Thread
Results 1 to 10 of 10
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, ...
  1. #1
    Jake's Avatar
    Join Date
    Jan 2006
    Location
    Sunny South Coast
    Posts
    954
    Thank Post
    11
    Thanked 12 Times in 10 Posts
    Rep Power
    20

    Apostrophe in username preventing login

    Morning,

    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?

    Jake

  2. #2
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,351
    Thank Post
    36
    Thanked 465 Times in 397 Posts
    Rep Power
    105
    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

  3. #3
    Jake's Avatar
    Join Date
    Jan 2006
    Location
    Sunny South Coast
    Posts
    954
    Thank Post
    11
    Thanked 12 Times in 10 Posts
    Rep Power
    20
    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"

  4. #4
    mattgrimley's Avatar
    Join Date
    Jun 2011
    Location
    Bedfordshire
    Posts
    313
    Thank Post
    34
    Thanked 21 Times in 19 Posts
    Blog Entries
    1
    Rep Power
    9
    Hey @Jake,

    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:
    https://www.google.co.uk/search?q=ap...e+in+usernames

    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.

    Matt

  5. #5
    Jake's Avatar
    Join Date
    Jan 2006
    Location
    Sunny South Coast
    Posts
    954
    Thank Post
    11
    Thanked 12 Times in 10 Posts
    Rep Power
    20
    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

  6. #6

    Join Date
    Dec 2008
    Location
    Essex
    Posts
    2,137
    Thank Post
    1
    Thanked 326 Times in 316 Posts
    Rep Power
    76
    Is it just logging onto a workstation like Win 7?

    I can login with a apostrophe in the username.

    Win 7 * W2k8R2

  7. #7

    Join Date
    Jan 2006
    Location
    Surburbia
    Posts
    2,178
    Thank Post
    74
    Thanked 307 Times in 243 Posts
    Rep Power
    114
    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...

  8. #8
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,351
    Thank Post
    36
    Thanked 465 Times in 397 Posts
    Rep Power
    105
    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)

  9. #9
    Jake's Avatar
    Join Date
    Jan 2006
    Location
    Sunny South Coast
    Posts
    954
    Thank Post
    11
    Thanked 12 Times in 10 Posts
    Rep Power
    20
    Thanks Nick, I've no idea if this is any help or not ...

    Handling Apostrophe (single-quote) in XPath expressions in .NET Bugs! Space

  10. Thanks to Jake from:

    nickbro (17th April 2012)

  11. #10
    nickbro's Avatar
    Join Date
    Jul 2010
    Location
    Gilwern, Wales
    Posts
    3,351
    Thank Post
    36
    Thanked 465 Times in 397 Posts
    Rep Power
    105
    will look into it this weekend

  12. Thanks to nickbro from:

    Jake (20th April 2012)

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 2
    Last Post: 4th February 2009, 10:02 AM
  2. Help im in deep ! Slow login problems
    By mactech03 in forum Mac
    Replies: 8
    Last Post: 10th November 2008, 06:45 PM
  3. Extra apostrophes in Excel
    By TechMonkey in forum Windows
    Replies: 6
    Last Post: 30th April 2008, 01:33 PM
  4. Replies: 2
    Last Post: 26th February 2008, 08:20 PM
  5. Spaces in username box
    By jayrt in forum Windows
    Replies: 25
    Last Post: 29th March 2006, 10:54 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •