开发者

requiresuniqueemail=true implementation in asp.net site

开发者 https://www.devze.com 2022-12-23 03:26 出处:网络
Hi people I got a social networking site that is running live right now. The first time I launched my site I let requiresuniqueemail=false set-up on my web.config in order for me to create dummy acco

Hi people I got a social networking site that is running live right now.

The first time I launched my site I let requiresuniqueemail=false set-up on my web.config in order for me to create dummy accounts for testing purposes and to start up the site you know. However the site is kind of stable right now with almost 5k members.

I would like to set-up the requiresuniqueemail to true so that users cannot reuse their existing email address and for me to make it sure that there will be unique email ad for each site user. I know the site got like 100 users with the same email address.

What could be the problem I'm going to face if I do this right now(requiresuniqueemail="true") and how to do 开发者_运维知识库this efficiently (without errors and if possible sitewide say in the global.asax)?

I tested and I already got an error if I logout an account.Like say a user try to click log-out this code runs:

 Dim d As DateTime = DateTime.Now.AddMinutes(-1 * Membership.UserIsOnlineTimeWindow)
        Dim theuser As MembershipUser = Membership.GetUser()
        theuser.LastActivityDate = d
        Membership.UpdateUser(theuser)
        If Not Cache(Page.User.Identity.Name.ToLower() + "currentstatusnow") Is Nothing Then
            Cache.Remove(Page.User.Identity.Name.ToLower() + "currentstatusnow")
        End If
Then an exception occured on updateuser() function saying

System.Configuration.Provider.ProviderException: The E-mail supplied is invalid.

This is just one instance I know that I encountered a problem. Hoping to hear your ideas guys.....

0

精彩评论

暂无评论...
验证码 换一张
取 消