So, I was trying to use Sitecore Serialisation, and I got the following error:
System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.IO.Path.IsPathRooted(String path)
at Sitecore.Data.Serialization.PathUtils.MapItemPath(String itemPath, String root)
Joy. Sadly, this pad doesn’t give a clue what the problem item actually is. The log files don’t show an exception – but I can see the last item processed, and it looks funny:
So, if that’s the item throwing the exception then a) serialisation isn’t logging the exception, which sucks, and b) some items in this tree have newline or carriage return characters (\n or \r)
To try and find these, I ran SQL against the database…
SELECT * FROM [MASTER].[dbo].[Items]
where Name like '%' + CHAR(10) + '%'
or Name like '%' + CHAR(13) + '%'
This found a bunch of items with \r in their names. Lord knows how they were put there. I suspect copy and paste from some of the actual content.
I recently had to work with a Sitecore instance where one of my colleagues – who has gone – had not documented the password.
The quickest answer I could find to this was to reset the password to its default:
-- Might want to check that 'B09BBCDE-9B3C-4DCD-B69E-67F615CE01E9' is your Administrator
set [Password] = 'qOvF8m8F2IcWMvfOBjJYHmfLABc=',
[PasswordSalt] = 'OM5gu45RQuJ76itRvkSPFw=='
where UserId = 'B09BBCDE-9B3C-4DCD-B69E-67F615CE01E9'
Trying to test SQL connections from servers that don’t have any SQL tools on them can be a little … awkward. Well, here’s a great tip from Doug Rathbone – Testing connectivity to Microsoft SQL Server without any tools installed.
Too long? Create a .UDL file, and use its property window.
Genius, and simple.
I’ve got a lot of Virtual Machines for development, and that means a lot of SQL installs. They’re not all the same edition, though, or versions, or service packs. It can be a bit confusing knowing which one I’m dealing with. And I can never remember how to find out – so here is the reminder…
select serverproperty('productversion'), serverproperty('productlevel'), serverproperty('edition')