FREE "Members Only" Web Site Starter Code - .NET 2.0

Discussion in 'HTML & Website Design' started by Mike H., Aug 22, 2007.

  1. #1
    FREE "Members Only" Web Site Starter Code, hereby placed in the public domain. No copyright.

    Written in ASP.NET 2.0 / C# / JavaScript

    Download the code, in a .zip file, 286Kb, here:

    www.javascript-demos.com/download_center_lite/index_t.php?Pro_Forma_Application.zip

    Contains the following:
    - Home page with a menu
    - Create an account page
    - Login / Change Password page
    - Recover Password page
    - Contact Us page
    - Membership Manager page for the Administrator
    - Application Role Manager page for the Administrator
    - Members Only folder

    Now you can quickly create a "Members Only" site, by doing not much more than building all of your content pages and placing them in the App_Content folder. All of the administrative coding has been done for you.

    The hosting account must support ASP.NET 2.0.

    Using .NET's web site security tools, two "Roles" have already been created: "Administrators" and "Members".

    An Administrator's account has also already been created:
    UserID: Admin_1
    Password: password_1

    A site visitor creates an account. A welcoming email is sent, which states that the account will be activated the first time the user logs in. Upon logging in for the first time, the user is AUTOMATICALLY assigned to the "Members" role.

    A "Members Only Content" menu option becomes visible only for logged in "Members" and the Administrator. Even if someone knows a URL that is within the App_Content folder, they won't be able to view it.

    A "Membership Manager" menu option becomes visible only for the logged in Administrator.

    Using the Membership Manager page, the Administrator can:
    - View a list of, and manage some important user account details:
    - Current email address
    - Approved or Disapproved status
    - Locked or not locked out status
    - Whether a user is online or not
    - The date/time the account was created
    - Roles to which the user has been assigned
    - Deactivate a user
    - Reactivate a user
    - Unlock a user's account (an account is "Locked" if 5 failed login attempts occur within a 10 minute period)
    - Delete a user account
    - Change a user's email address
    - Assign a user to a role
    - Delete a user from a role

    The Administrator also has access to the "Application Role Manager" page.
    There, the Administrator can create new roles, or delete existing roles. It is best to just leave things as they are on that page.

    The "Contact Us" page may be used by anyone, and has fields for an email address and a message. Clicking the Submit button sends the message to a pre-defined Admin address, in the .config fie. Also, the maximum number of words in the message is limited to a pre-defined value in the .config file:

    <appSettings>
    <!-- Change the value to the email address where the Contact Us form will be submitted -->
    <add key="mailTo" value="me@localhost"/>
    <!-- Change the value to maximum allowed words in the Contact Us form message field-->
    <add key="maxWords" value="25"/>
    </appSettings>

    The following section in the .config file must also be edited, if necessary for local IIS testing, and certainly if the code is uploaded to an active domain.

    <!--
    The host, below is usually similar to: smtp.somedomain.com
    You must also supply your HOSTING ACCOUNT userName and password
    NOT the SQL userName/password
    -->
    <mailSettings>
    <smtp from="Admin@mynewsite.com">
    <network host="localhost" port="25" password="" userName="" defaultCredentials="true"/>
    </smtp>
    </mailSettings>

    Finally, prior to uploading the code to an active domain, the following .config setting should be changed to false:

    <compilation debug="true" />

    Otherwise, the site will be unnecessarily slow to respond.

    Again, other than the above changes to the .config file, all you need to do is create your content pages, and probably a menu/navigation scheme, along with your graphics and other design features, and then place those files in the App_Content folder.

    If you create new users when testing the code in IIS, use your default smtp server address (e.g. me@localhost) as the new user's email address, because that's where the welcoming email will be sent. Otherwise, an error will occur.

    I appreciate the courtesy of everyone who takes the time to respond.
     
    Mike H., Aug 22, 2007 IP
  2. twistedspikes

    twistedspikes Notable Member

    Messages:
    5,694
    Likes Received:
    293
    Best Answers:
    0
    Trophy Points:
    280
    #2
    nice. I'll check it out.
     
    twistedspikes, Aug 22, 2007 IP
  3. Mike H.

    Mike H. Peon

    Messages:
    219
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks. Please let me know if you find an error. I've tested it quite a bit, but you never know...
     
    Mike H., Aug 22, 2007 IP
  4. B4nks

    B4nks Peon

    Messages:
    42
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks, I have a client comming up that would like this feature. I've downloaded it but won't check it out for a little bit. How would you rate it on "customizability" ?
     
    B4nks, Aug 22, 2007 IP
  5. Mike H.

    Mike H. Peon

    Messages:
    219
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Customizing the appearance is completely up to you. There is a Stylesheets folder with just one file in it, Site_Wide.css, just to provide a basic design. I assumed that anyone who uses the code would delete or modify that file to suit their needs. Nothing is permanent.
     
    Mike H., Aug 22, 2007 IP
  6. B4nks

    B4nks Peon

    Messages:
    42
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Okay great so incorperating it into one's site should be no problem.
     
    B4nks, Aug 22, 2007 IP