Devam Ediyor

491901 Error Notification via E-Mail

When you try to log in, if your user name is not Mickey, Minnie, or another user you added (that is, if the user name is not found in tblUserLogin), then an e-mail should be sent to the address recipient(at sign)recipientdomain.com. If the user attempts to bypass the login page by typing a page name in the URL, your web application should redirect the user back to the login page. Once you have verified that it works, save your project, zip up all files, and submit in the Dropbox.

NOTE: E-mails may be blocked due to firewalls, antivirus software, or even Internet service providers that turned off SMTP because of some known security issues. If the code works (does not produce an error when submitting), you will get full credit for this project even if no e-mail message is actually transmitted. Consult with your instructor before submitting if an error occurs or if no e-mail is generated, to be sure.

i L A B S T E P S

STEP 1: Business Layer Functionality (10 points)

[url removed, login to view] Microsoft Visual [url removed, login to view] 2008.

[url removed, login to view] the [url removed, login to view] website named PayrollSystem to open it.

[url removed, login to view] a new class called clsBusinessLayer.

Add the following code in the clsBusinessLayer class:

// **** Add the following at the top of the class file,

// Add your comments here

using [url removed, login to view];

//**** Add the following code inside the body of public class clsBusinessLayer ****

public static bool SendEmail(string Sender, string Recipient, string bcc, string cc,

string Subject, string Body)

{

try {

// Add your comments here

MailMessage MyMailMessage = new MailMessage();

// Add your comments here

[url removed, login to view] = new MailAddress(Sender);

// Add your comments here

[url removed, login to view](new MailAddress(Recipient));

// Add your comments here

if (bcc != null && bcc != [url removed, login to view]) {

// Add your comments here

[url removed, login to view](new MailAddress(bcc));

}

// Add your comments here

if (cc != null && cc != [url removed, login to view]) {

// Add your comments here

[url removed, login to view](new MailAddress(cc));

}

// Add your comments here

[url removed, login to view] = Subject;

// Add your comments here

[url removed, login to view] = Body;

// Add your comments here

[url removed, login to view] = true;

// Add your comments here

[url removed, login to view] = [url removed, login to view];

// Add your comments here

SmtpClient MySmtpClient = new SmtpClient();

// Add your comments here

[url removed, login to view] = 25;

[url removed, login to view] = "127.0.0.1";

// Add your comments here

[url removed, login to view](MyMailMessage);

// Add your comments here

return true;

} catch (Exception ex) {

// Add your comments here

return false;

}

}

STEP 2: Integration (10 points)

[url removed, login to view] the frmLogin web form code behind file and add the following code to the body of the if ([url removed, login to view] < 1) statement, just above the return statement:

// Add your comments here

// Add your comments here

if ([url removed, login to view]("youremail(at sign)[url removed, login to view]",

"receiver(at sign)[url removed, login to view]", "", "", "Login Incorrect",

"The login failed for UserName: " + [url removed, login to view] +

" Password: " + [url removed, login to view]))

{

[url removed, login to view] = [url removed, login to view] +

" Your incorrect login information was sent to receiver(at sign)[url removed, login to view]";

}

NOTE: Change the youremail(at sign)[url removed, login to view] and receiver(at sign)[url removed, login to view] to your e-mail and someone else's e-mail for testing.

[url removed, login to view]: Perform this step only if you are doing this lab using Visual Studio 2008 installed on your own computer, your computer has Internet Information Services (IIS) installed, and you have administrative rights to IIS. If you are doing this lab using the iLab (Citrix) server, or if you do not have access to IIS, skip to step 8.

Open IIS (Start > Control Panel > Administrative Tools > Internet Information Services), navigate to the Default SMTP Virtual Server, right-click on it, and left-click on Properties.

Click on image to enlarge.

IIS Admin

Click here for text description of this image.

7. Click the Access tab, then the Relay button, then Add, and add the IP 127.0.0.1. Click OK, OK, and APPLY when finished.

Click on image to enlarge.

IIS Relay

Click here for text description of this image.

[url removed, login to view] have a security hole in our web application. If you start the web application by going to the login page, you can bypass the login page by simply typing the name of a form in the URL (try it). There is some limited protection because of the check we are doing for user role, but it still allows a user to get to pages we don't want them to get to unless the role is set properly. Add a security check in the Page_Load of each sensitive page (Manage Users, Add New Employee, View User Activity, Edit Employees), check for the Session role item with a value of "A," and, if the user is accessing these pages without the proper permissions, redirect back to the [url removed, login to view] page.

[url removed, login to view] still leaves the possibility of a person bypassing the login page. We will fix that by using forms authentication. Add the following to the [url removed, login to view] file. (There should already be an authentication section – replace it with this.)

<authentication mode="Forms">

<forms loginUrl="[url removed, login to view]" />

</authentication>

<authorization >

<deny users="?" />

</authorization>

10. This will redirect users to the login page if they have not yet gone through it for login. This process will use a cookie – when the user successfully logs in in a cookie is set that allows the user to go to other pages. If that cookie is not set then the user is redirected to the login page if they try to go to any other page. Add the cookie code by adding this code in the [url removed, login to view] C# code after each place that you have [url removed, login to view] = true:

[url removed, login to view]([url removed, login to view], false);

Hints:

Make sure you reestablish your database connection if you copied the files from a previous lab. Also, make sure to update the [url removed, login to view] file with the database connection string.

Update any DataSource controls you added with the new payroll database location.

When you manually try to go to a second page by skipping the login page, a cookie is set specifying the name of the page you were attempting to go to. Once you login successfully, [url removed, login to view] will automatically attempt to navigate back to that page. You can reset the cookie so that the next page is frmMain, as expected, by typing that page in the URL for the browser before logging in.

Submit Final Lab (includes all previous lab assignments)

STEP 3: Test and Submit (10 points)

Run your project. When you try to log in, enter a user name that is not Mickey or Minnie (i.e., a user name that is not found in tblUserLogin). An e-mail should be sent to the recipient(at sign)[url removed, login to view] e-mail address.

Test that frmMain reconfigures properly based on user role. Make sure the user cannot bypass the login page.

Once you have verified that everything works, save your website, zip up all files, and submit in the Dropbox.

NOTE: E-mails may be blocked due to firewalls, antivirus software, or even Internet service providers that turned SMTP off because of some known security issues. If the code works (does not produce an error when submitting), you will get full credit for this project even if no e-mail message is actually transmitted. Consult with your instructor before submitting if an error occurs or if no e-mail is generated. It is expected that no e-mail will be sent if you are using the DeVry iLab (Citrix) server for this lab or if you were not able to configure IIS in step 7.

NOTE: Make sure you include comments in the code provided where specified (where the " // Add your comments here" is mentioned), including code you wrote, or else a 5 point deduction per item (form, class, function) will be made.

*********************************************************************

This is the project I need, I have included a zip folder of my project so far this just needs to be added on, also attached the database just incase. I have no time to complete this project because of a family emergency. So any help would be great. In the emails in the code I replaces the traditional at sign with at sign because it wouldn't let me post otherwise. if this could be replaced with jurzzy81(at sign)gmail.com. Any other question PM me.

Beceriler: .NET, Her şey Kabul, ASP, Düzenleme, IIS, Web Güvenliği

Daha fazlasını görün: clsbusinesslayer, found employees, website redirect fix, web consult, web based payroll service, virtual typing services, top software testing tools, sure payroll, software testing service, security notification service, receiver update, receiver testing, receiver fix, payroll statement, new employee forms, need employee business, need employee new business, my payroll, microsoft fix website, microsoft computer fix website, want make web, lt security, want start business internet, internet catch, need someone payroll

İşveren Hakkında:
( 7 değerlendirme )

Proje NO: #2237813