Requirements
-
Visual Studio 2015 or Visual Studio 2017.
-
SQL Server 2017 or SQL Server 2016 SP1.
Setting up the application
- Clone the repository from master branch and save it to your local disk.
- Un-Zip the VotingBox.zip file and restore the database to SQL server.
- Open the VotingApp.sln in Visual Studio from where the code was saved from Step One.
- Build the solution and allow nuget to restore all the packages.
Configuring the Connection Strings
There are two connection strings to set up in order to use the Voting App.
- Find the App.config in the VotingApp project and Set the DataSource and Intial Catalog to what is set up in the local sql server.
- Find the App.config in the VotingWeb project and Set the DataSource and Intial Catalog to what is set up in the local sql server.
Configuring the Log File
- Open up NLog.Config in the VotingWeb project and find the line
<target name ="logfile" xsi:type="File" fileName="../logs/logfile.txt"/>
- Change the fileName to any valid directory path, to change the location of the log file location
More Information for the log libary can be found here: http://nlog-project.org/
Start Debugging the App! Configuration and Setup are complete!
Registering A New User
In order to use the App, other than the Home Page and Voting Information Page, you must be registered as a user.
- Click the Register Button in the top right corner of the page.
- Fill out the Form.
The password will need to have at least:- One Capital Letter
- One Special Character and One Number
- Click the Register Button.
Registering A New Admin User
- Repeat Steps for Registering A New User.
- Once Registered, go into the database and find AspNetRoles. If you did not use the backup provided execute the following;
INSERT INTO AspNetRoles(Id,Name)VALUES(NEWID(),'CanSeeElectionResults')
- Find your AspNetUserId in the AspNetUserTable by searching for your email address. Add a row in AspNetUserRoles with your UserId and the RoleId that you created/found in Step Two.
Rules for Voting and Ballot Information
You must be a registered voter to able to use this functionality.
Once you vote, you cannot vote again on the same account. No Double Voting!
Ranking Candidates (For President and Vice-President)
- Integers must be used in this sections inputs. Text is invalid.
- Ranking input is for both President and Vice-President
- Write-in candidates are considered a valid rankable candidate.
- The first input is for the Presidential candidate write-in.
- The second input is for the Vice-Presidential candidate write-in.
- The third input is for giving the candidates a rank.
Multi Vote Candidates (State Representatives)
- Abilty to choose multiple candidates (up to two) by selecting each appropriate checkbox.
- Ability to write-in one of the multiple candidates.
- First input is for the name of the State Representative write-in.
Single Vote Ballot Issue/Candidate
- Ability to pick either Yes or No for these ballot items.
- No write-in allowed for these items.
Viewing the Election Results
Must be logged in as an Admin, to use this functionality.
- Log in as an Admin.
- Click the Election Results tab.
- Results will be listed in the following order:
- President and Vice-President
- Supreme Court Judge
- State Representative
- Ballot Issue