Getting Started
Software Requirements
Please make sure you have downloaded and installed the following software before using Hero Membership:
What's Included
Hero Membership includes full source code in both C# and Visual Basic.
The *.vsi files included in the download contain the source code packaged
as a Visual Studio project template. Install the template for the language
and version of Visual Studio you are using if you want to easily create new
web sites using the Hero Membership code base as a starting point. If you are
integrating the code into an existing site or prefer to just copy the source
code when creating new site then simply unzip the soure for your preferred
language and Visual Studio version.
Using the Web Site Template
Installing the project template does not make any registry entries or otherwise clutter up your computer.
It simply places the template source into your Visual Studio "Project Templates" folder. This is usually located here:
%USERPROFILE%\My Documents\Visual Studio 2008\Templates\ProjectTemplates\Visual Web Developer).
If you wish to remove the template later you can simply delete the zip file(s) from this folder.
Once the template is installed you will see a Hero Membership Enabled Web Site option
in the My Templates section when you create new web sites.

Integrating With an Existing Site
Integrating Hero Membership into an existing site is easy. All you have to do is copy some files.
To add Hero Membership to your site copy the following folders and files:
| Folder/File |
Description |
| Admin |
The admin folder contains all the administration screens needed to administer your membership database. |
| App_Code |
This folder contains all the code needed by the administration UI. All the code is contained in a Hero subfolder
so you should not have to worry about any files having the same names as files you may already have in your
App_Code folder. |
| App_Data |
Contains configuration datafiles used when you membership database is initialized as well as the password recovery email template. |
| App_Themes |
Contains the images and CSS that are used by the administration UI. |
| Bin |
Contains the AJAX control toolkit. If you are not already using the control toolkit you will need to copy these files. |
| Layouts |
Contains master pages and sitemap files. |
| Member |
This folder contains an "Account" page that your users can use to change their email address and password.
You can copy this folder if your interested in that functionality. It is not required for the admin. |
| Scripts |
Contains all the JavaScript files used by Hero Membership. |
| Login.aspx |
If you do not already have a login page you may wish to copy this page. Obviously you will need some sort of
Login page in order to access the administration area of your web site. |
| ForgotPassword.aspx |
This allows your users to have their passwords emailed to them. Copy this page if you are interested in that functionality.
It is not required for the administration portion of the site. |
| Web.config |
The web.config file provided contains all the default settings that ASP.NET uses for Membership. You will
need to make sure that your web.config has the same configuration settings that this file contains.
See the Required Web.config Settings section for a full reference on these settings. |
Running the Site for the First Time
The first time you run the site you will see the screen pictured on the right. Admin and Support roles will be
created as well as an Admin user and a Support user. You can control which users are created at application
startup by editing these config files:
- ~/App_Data/Hero/Membership/DefaultUsers.xml
By default ASP.NET Membership will create a SQL Server Express database in your ~/App_Data folder
called ASPNETDB.mdf. During development you can delete this file when you want to clear out the user
database and it will get recreated the next time you run the application. If you wish to have your
membership information stored in a different database watch our video
Using a Remote SQL Server Database in our videos section.
|