Jump to content

Recommended Posts

Posted

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

Posted
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" :)
Posted

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=apostrophe+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

Posted
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 :)
Posted
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...
Posted
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)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...