- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我查看了 msdn 文档,它说在数据库中找不到用户名时会抛出 InvalidUserName,这很好,因为我创建的用户不应该存在于数据库中。
如果我使用 test@example.com,它可以工作,但如果我尝试使用 test.@example.com,Membership.CreateUser 的状态是 InvalidUserName。
最佳答案
电子邮件地址采用 username@domain 的形式,其中域至少由句点/点分隔的两部分组成。
RFC 规范说一个 .在地址的用户名部分 (@之前的部分)有效,除非 .是(用户名的)第一个或最后一个字符,因此您注意到的行为是正确的。
http://tools.ietf.org/html/rfc5322
很好的发现@David Stratton:来自他评论中的维基百科链接......
Character . (dot, period, full stop) provided that it is not the first or last character, and provided also that it does not appear two or more times consecutively (e.g. John..Doe@example.com).
关于asp.net - InvalidUserName in asp.net CreateUser 使用 . @ 字符前的字符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3344843/
我查看了 msdn 文档,它说在数据库中找不到用户名时会抛出 InvalidUserName,这很好,因为我创建的用户不应该存在于数据库中。 如果我使用 test@example.com,它可以工作,
我需要创建一个具有用户名、名字、姓氏和电子邮件字段的用户。我正在使用 Mysql 数据库和 Pomelo 包。迁移和数据库更新工作正常。 此代码导致失败。 public async Task Crea
我需要创建一个具有用户名、名字、姓氏和电子邮件字段的用户。我正在使用 Mysql 数据库和 Pomelo 包。迁移和数据库更新工作正常。 此代码导致失败。 public async Task Crea
我是一名优秀的程序员,十分优秀!