You are on page 1of 6

Introduction

This website is coded in C# and ASP.NET. The CP1 website follows a modular approach. It
consists of three main modules:
 Dashboard
 Dashboard_Business Logic
 Dashboard_Data Layer

Following is the layered view of the Dashboard website:

Dashboard_Data Layer

The lower most layer “Dashboard_DataLayer” layer interacts with the MySQL Database using
SQLConnector . This layer provides the lower level functionality of executing the Queries and
NonQueries. The following functions are the part of “Dashboard_Data Layer”.

namespace DashBoard_DataLayer
{
publicclassDataChannel // for creating a channel with the database
{
public MySqlConnection GetDatabaseConnection // to return the odbc connection object
public DataChannel getDataChannel() //to return the data channel object
public DataChannel() // to define the connection parameters
public void closeConn() // to close the odbc connection

}
}
namespace DashBoard_DataLayer
{
public classDatabaseOpsExecutor
{
public DataSet executeQuery(String query, MySqlConnection conn) // meant for SELECT
queries
public int executeNonQuery(String query, MySqlConnection con) // meant for UPDATE,
INSERT, etc.
}
}

DashBoard_BusinessLogic

The “Dashboard-Business Logic” layer contains all the logics for fetching and storing the data
required by the functions of “Dashboard” layer. The “Dashboard- Business Logic” interacts with
“Dashboard-Data Layer” to fetch the data from or store the data in the MySQL database. This
layers also provides other non-database functionalities required by “DashBoard Layer” to make
the website more modular and simple. The following functions are the part of
“Dashboard_BusinessLogic”.

namespace DashBoard_BusinessLogic
{
public classUtils
{
public DataRow validateLogin(String user, String pass) // to check the login username and
password
public DataRow getuserdetails(String user)// to fetch the password and other details
corresponding to a username
public String GetMacAddress(String IPaddress)// to get the mac address for a particular IP
address ( works within a VLAN) (not used)
protected String getMac(String IPaddress) // used by GetMacAddress
public String get_password(String user) // get only password for a particular user
public int update_login(String username,String newpassword) // reset the password for a user
public int update_login_batch(String username, String batchno) // update the batch number for a
particular username
public int setloggedin(String name,int num) // mark the user as logged in when he logs in (not
used)
public DataRow exists_user(String username) // check whether a user with a given emailid exists
or not
public string GeneratePassword() // generate a new password
public String store_new_users_data(DataTable new_users_data,String batch) // store the
username and password of the users for a particular batch with their batch number
public void sendEmail(String sendto,String mail_message) // send Email to all students their
username , password and batch no
public DataTable fetch_users_data() // fetch the username and passwords of the users
public String check_active(String batch_id) // check whether a particular batch is allowed to
write the exam or not
public int fetch_number_of_batches() //fetch number of batches
public int create_batch(int beg, int end) // create a new batch
public int delete_batch(int beg, int end) // delete a batch
public int activate_none() // deactivate all batches to sit for test
public int activate_all() // activate all batches to sit for test
public int activate_batch(int batch_id) // activate a particular batch for the test
public int store_lab_password(String password) // store the password for the lab test
public int store_mac(String username,String macaddress, String date,String pathtofile) // store
the mac address (ip address) and other details whenever a user saves some answer
public int store_login(String username, String macaddress, String date) // store the mac address
(ip address) and other details whenever a user logins
public String fetch_lab_password() // fetch password for the test
public DataTable absentees(String batch_id) // list the absentees for a particular batch id
public DataTable presentbutnotuploaded(String batch_id) // list the students who have logged in
but did not upoad anything
public DataTable usersfrom2computers() // list the users who have uploaded from more than 1
computer
public DataTable computerwith2users() // list the computers from where more than 1 students
uploaded

}
}

DashBoard

The User interface is rendered by the code of the “Dashboard” layer. The “Dashboard” layer
interacts with “Dashboard-Business Logic” for any database or non- database related
functionality. The following webpages are the part of “Dashboard” layer.

Administrator Webpages

admin_addlab.aspx
administrator.aspx
attendance.aspx
Malicious.aspx
QuestionUpload.aspx
ResetPassword.aspx
Upload_Main.aspx
Upload_Testcases.aspx
Lab Instructor Webpages

LabInstructor.aspx
attendance_lab_inst.aspx

Student Webpages

Student.aspx
View_Submissions.aspx
QuestionListView.aspx
QuestionView.aspx

Common Webpages

ChangePassword.aspx
Default.aspx
ForgotPassword.aspx

Master Pages

Site1.Master
Site2.Master
Site3.Master

Master Pages are pages common to all webpages.


Site1.Master is for Student Webpages,
Site2.Master is for Administrator Webpages and
Site3.Master is for Lab Instructor Webpages
Website deployment

1) Install Microsoft Visual Studio 2010 or above.


2) Install MySQL Database
3) Change the connection string in the website code according to the password of the
database, database server ipaddress, name of database, etc

string connStr =
"server=127.0.0.1;database=edx_cp1;user=root;password=jhu58HRF4;Port=3306;Charac
ter Set=utf8;";
4) Go to Control Panel -> Programs and Features -> Turn Windows Features on or off ->
Internet Information Services

Check the following options and click OK

FTP Server
IIS Management Console
.NET Extensibility
ASP.NET
ISAPI Extensions
ISAPI Filters
Default Document
Directory Browsing
HTTP errors
Static content
HTTP logging
Request Monitor
Static Content Compression
Request Filtering
5) Go to Control Panel - >Windows Firewall ->Allow a program or feature through
Windows Firewall

Click on Change Settings, check the World Wide Web Services (HTTP) option and
click OK.

6) Build the Website and then paste the content of the top layer of DashBoard into
C:\inetpub\wwwroot.

7) Go to Internet Information Services (IIS) Manager. On the Connection Window, right


click on your website, click on Manage Website and then click start.

8) Enter 127.0.0.1 on your local computer or the LAN IP address on another computer to
access the website.

You might also like