PC Review


Reply
Thread Tools Rate Thread

Creating an activation link for an account

 
 
Andy B
Guest
Posts: n/a
 
      30th Jul 2008
I am working on a mailing list service for our company. One of the
requirements is that when a person signs up for a mailing list through the
website they have to activate their subscription through a link sent to them
in an email. How would I do something like this? The db being used is sql
server 2005 express.



 
Reply With Quote
 
 
 
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      30th Jul 2008
When the person creates the account, create a GUID for the user. The easiest
way, in SQL Server (Express or otherwise) is to set a column up with
IsRowGuid = true. You will also want a column named IsConfirmed as a bit and
defaulted to 0. Something like:

ALTER TABLE Users
ADD
[ConfirmId] [uniqueidentifier] ROWGUIDCOL NOT NULL CONSTRAINT
[DF_Users_ConfirmId] DEFAULT (newid()),
[IsConfirmed] [bit] NOT NULL CONSTRAINT [DF_Users_IsConfirmed] DEFAULT
((0))


Then send an email with a link like this:
http://www.yourcompany.com/confirm.aspx?id={the_guid_here}

When they click on the link, you have code that updates IsConfirmed to 1
(true). You then have to alter the logon mechanism to respect that field. If
you are using ASP.NET Membership, create a custom membership provider rather
than whack any bits Microsoft created. As a personal note: There is nothing
more aggrevating, as a consultant, than coming in and finding that the
errors you are experiencing are due to someone whacking standard bits rather
than deriving their own classes. In addition, these whack jobs are rarely
documented, so they can cause great pain to the company when they have to
move the application to another server or get new developers on it years
later.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

********************************************
| Think outside the box! |
********************************************
"Andy B" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>I am working on a mailing list service for our company. One of the
>requirements is that when a person signs up for a mailing list through the
>website they have to activate their subscription through a link sent to
>them in an email. How would I do something like this? The db being used is
>sql server 2005 express.
>
>
>


 
Reply With Quote
 
Andy B
Guest
Posts: n/a
 
      30th Jul 2008
Ill look into it and see how it goes. I wont be using the standard
membership providers for the mailing list service and I am going to be
revamping the website this off season anyways so can make some better
improvements along with another major project I have to do.


"Cowboy (Gregory A. Beamer)" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> When the person creates the account, create a GUID for the user. The
> easiest way, in SQL Server (Express or otherwise) is to set a column up
> with IsRowGuid = true. You will also want a column named IsConfirmed as a
> bit and defaulted to 0. Something like:
>
> ALTER TABLE Users
> ADD
> [ConfirmId] [uniqueidentifier] ROWGUIDCOL NOT NULL CONSTRAINT
> [DF_Users_ConfirmId] DEFAULT (newid()),
> [IsConfirmed] [bit] NOT NULL CONSTRAINT [DF_Users_IsConfirmed] DEFAULT
> ((0))
>
>
> Then send an email with a link like this:
> http://www.yourcompany.com/confirm.aspx?id={the_guid_here}
>
> When they click on the link, you have code that updates IsConfirmed to 1
> (true). You then have to alter the logon mechanism to respect that field.
> If you are using ASP.NET Membership, create a custom membership provider
> rather than whack any bits Microsoft created. As a personal note: There is
> nothing more aggrevating, as a consultant, than coming in and finding that
> the errors you are experiencing are due to someone whacking standard bits
> rather than deriving their own classes. In addition, these whack jobs are
> rarely documented, so they can cause great pain to the company when they
> have to move the application to another server or get new developers on it
> years later.
>
> --
> Gregory A. Beamer
> MVP, MCP: +I, SE, SD, DBA
>
> Subscribe to my blog
> http://gregorybeamer.spaces.live.com/lists/feed.rss
>
> or just read it:
> http://gregorybeamer.spaces.live.com/
>
> ********************************************
> | Think outside the box! |
> ********************************************
> "Andy B" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>>I am working on a mailing list service for our company. One of the
>>requirements is that when a person signs up for a mailing list through the
>>website they have to activate their subscription through a link sent to
>>them in an email. How would I do something like this? The db being used is
>>sql server 2005 express.
>>
>>
>>

>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: link activation in Outlook Diane Poremsky [MVP] Microsoft Outlook Discussion 0 11th Nov 2009 02:36 AM
RE: creating standard account has ruined the admin account silver hair Windows Vista General Discussion 0 23rd Nov 2008 08:20 PM
Creating user account by activation link. archana Microsoft ASP .NET 1 10th Aug 2007 07:18 AM
User account automation:account is created in site1 OK, but when creating the folders/permissions on remote servers, it fails (replication) Marlon Brown Microsoft Windows 2000 Active Directory 4 31st Aug 2004 05:50 PM
user account didnot not open for creating new account shah Windows XP Performance 0 29th Oct 2003 11:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:48 AM.