Permitted character for SQL Server CE password?

In the developed web application, we create SQL Server CE database files, and for those that we also generate passwords. Passwords are created using System.Web.Security.Membership.GeneratePassword ().

I assumed that GeneratePassword generates suitable password strings as it uses letters, numbers and characters. At http://msdn.microsoft.com/en-us/library/aa257373(v=sql.80).aspx I find the vague statement that SQL Server CE passwords "can contain letters, characters, numbers, or a combination of" .

But today, a password was created that made it impossible to create a database, because the connection string apparently had invalid characters. "& Amp;" to be precise.

I searched the net for a complete list of characters to make the whitelist function clear, but cannot find such information.

Does anyone have such a list of valid characters for SQL Server CE passwords?

+3
source share
2 answers

In the end, I had to create my own simple password generator. Blog HERE

It looks like you have an XML problem. Special XML characters (or web.config):

  • quot
  • amp &
  • apos'
  • lt lt lt <
  • gt>

In addition, if used in an OLE DB or ODBC connection string, the username or password should not contain the following characters: [] {} (),;? *! @.

In addition, if you require strong passwords, they must contain characters from at least the following three categories:

  • English uppercase characters (A to Z)
  • ( a z) Base 10 ( 0 9) Nonalphabetic
  • (:!, $, #,%)
+3

, .

0

Source: https://habr.com/ru/post/1793088/


All Articles