允许的字符为SQL Server CE密码? [英] Allowed character for SQL Server CE password?
问题描述
在我们开发我们生成SQL Server CE数据库文件的Web应用程序,并为那些我们还生成密码。使用System.Web.Security.Membership.GeneratePassword()生成的密码。
我认为GeneratePassword产生适当的密码字符串,因为它使用字母,数字和符号。在 http://msdn.microsoft.com/en -us /库/ aa257373(V = sql.80)的.aspx 我找到一个模糊的说法的SQL Server CE密码可以包含字母,符号,数字或组合。
不过今天生成一个密码,使得它不可能创建数据库,因为连接字符串显然有无效字符。与&为precise。
我已经搜查了净字符的完整列表,使白名单清洗功能,但无法找到任何这样的信息。
没有任何人有有效的字符,对于SQL Server CE的密码列表?
解决方案我最后不得不作出自己的简单的密码生成器
看起来你有一个XML的问题。 XML(或web.config文件)特殊字符是:
- QUOT
- 放大器和放大器;
- 者
- 在LT<
- GT>
另外,如果使用OLE DB或ODBC连接字符串,登录或密码不能包含以下字符:[] {}(); ? *! @。
另外,如果你需要强壮的密码,他们必须包含的字符来自至少三个以下类别:
- 英文大写字母(A至Z)
- 英文小写
- 字符(a到z)10个基本数字(0到9)非字母
- 字符(例如:!,$,#,%)
In a web application we develop we generate SQL Server CE database files and for those we also generate passwords. The passwords are generated using System.Web.Security.Membership.GeneratePassword().
I assumed that GeneratePassword generated suitable password strings since it uses letters, digits and symbols. On http://msdn.microsoft.com/en-us/library/aa257373(v=sql.80).aspx I find a vague statement that SQL Server CE passwords "Can contain letters, symbols, digits, or a combination."
But today a password was generated that made it impossible to create the database because the connection string apparently had invalid characters. "&" to be precise.
I've searched the net for a complete list of characters to make a white-list cleaning function, but cannot find any such info.
Does anyone have such a list of valid characters for SQL Server CE passwords?
I ended up having to make my own simple password generator. Blogged HERE
Looks like you have an XML issue. XML (or web.config) special characters are:
- quot "
- amp &
- apos '
- lt <
- gt >
Also, if used in an OLE DB or ODBC connection string, a login or password must not contain the following characters: [] {}() , ; ? * ! @.
Also, if you are requiring strong passwords they must contains characters from at least three of the following categories:
- English uppercase characters (A through Z)
- English lowercase
- characters (a through z) Base 10 digits (0 through 9) Nonalphabetic
- characters (for example: !, $, #, %)
这篇关于允许的字符为SQL Server CE密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!