Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 2nd, 2007, 02:55 PM
Authorized User
 
Join Date: Jul 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with Newsletter Control Box

Hi, I am developing a site using the book ASP.NET.2.0.Website.Programming.Problem.Design.Sol ution and i also have the source code. Now i reached at the Newsletter module, my problem is that, on my site when i clicked at the "Archived Newsletter" link placed at the newsletter control box, it directs me towards the archived newsletter page without checking that the user is logged in or not. But when i run the sample site named as "The Beer House", and click on the Archived Newsletter link, placed in the Newsletter control box, it checks that the user is logged in or not. And if the user is not logged in, it gives a warnning/message that in order to view the newsletters, u have to logged in or you must be a registerd user. I copy/paste the same code (for my site's newsletter control box) given in the sample site and matched it many times, they both are same. But my site's Archived Newsletter link placed in the newsletter control box is not working in this way. I'm not good in programming thats why i am facing difficulty to figure out that where the developer wrote, the code to implement this functionality. Can anybody helps me!!!! I define my problem as i could, and even then if anyone don't understand my problem then ask me, i will try to elaborate it further.

And sorry for bad english!!! :(
 
Old July 2nd, 2007, 03:16 PM
Friend of Wrox
 
Join Date: Aug 2006
Posts: 142
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via MSN to vantoko
Default

Hi,

First of all, this book is not intended for people who have no development background. You should start by learning asp.net before reading this book. You should use it to get an idea of a particular architecture for building a website.

To answer your question, look in the code behind of archivednewsletters.aspx.cs
there should be this line
protected void Page_Load(object sender, EventArgs e)
      {
         // check whether this page can be accessed by anonymous users. If not, and if the
         // current user is not authenticated, redirect to the login page
         if (!this.User.Identity.IsAuthenticated && !Globals.Settings.Newsletters.ArchiveIsPublic)
            this.RequestLogin();

that checks the identity of the user

grtz

koen

 
Old July 4th, 2007, 05:27 PM
Authorized User
 
Join Date: Jul 2007
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The code you have mentioned is already written there, but it is not checking the authentication. And it allows the user to view archived newslettters without being signed in. In other words, if the user is not logged in and he/she clicked on the Archived Newsletter's link in the Newsletter Control Box, it directs the user towards the archived newsletter.aspx page. Any other solution or suggestion?






Similar Threads
Thread Thread Starter Forum Replies Last Post
Group box control Tab Focus problem suji C# 0 September 26th, 2008 01:26 AM
Picture Box Control irresistible007 Beginning VB 6 0 October 28th, 2006 09:46 AM
Access program control box ppenn Access VBA 3 April 12th, 2006 06:46 AM
text box control data pzmrcd ASP.NET 1.0 and 1.1 Professional 1 January 10th, 2006 03:42 PM
Control Box Louisa VB.NET 2002/2003 Basics 0 February 22nd, 2005 11:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.