Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4
This is the forum to discuss the Wrox book Beginning Dreamweaver MX by Charles E. Brown, Imar Spaanjaars, Todd Marks; ISBN: 9780764544040
Please indicate which version of the book you are using when posting questions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 17th, 2003, 03:41 PM
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 12 - Second Try It Out

Hi,

I am basically using IF Else End If structure for 2nd
Try It Out of Chapter 12. It works fine for Admin group but
for Members it takes me back to Login Page with user logged in.

In first block of IF it checks for Admin group and in Else I have
code for Members group.

If InStr(1, "Administrators", MM_UserAuthorization) >= 1 Then
   MM_redirectLoginSuccess="admin/admin.asp"
Else
   MM_redirectLoginSuccess="./home.asp"
End If

Response.Redirect(MM_redirectLoginSuccess)

Thanks in advance for you help.
Omer
Reply With Quote
  #2 (permalink)  
Old July 17th, 2003, 04:19 PM
Imar's Avatar
Wrox Author
Points: 65,681, Level: 100
Points: 65,681, Level: 100 Points: 65,681, Level: 100 Points: 65,681, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 15,966
Thanks: 64
Thanked 1,349 Times in 1,329 Posts
Default

Hi Omer,

What page exactly are you on? The second Try It Out of chapter 12 does not discuss access levels yet.

Anyway, the problem may be caused by the fact that you have already protected the Admin page, so only administrators are allowed to access it. Right now, the code redirects to admin.asp after any successful login.

So, even a member is allowed access and redirected to admin. However, they are not allowed to access admin.asp and are redirected back to the login page. Is this the behavior you are experiencing? If so, check Bullet 12 at page 449 for an explanation.

If this is not the problem, can you post some more code and be more specific about the problem??

Regards,

Imar




---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #3 (permalink)  
Old July 18th, 2003, 06:30 AM
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by Imar
 Hi Omer,

What page exactly are you on? The second Try It Out of chapter 12 does not discuss access levels yet.

Anyway, the problem may be caused by the fact that you have already protected the Admin page, so only administrators are allowed to access it. Right now, the code redirects to admin.asp after any successful login.

So, even a member is allowed access and redirected to admin. However, they are not allowed to access admin.asp and are redirected back to the login page. Is this the behavior you are experiencing? If so, check Bullet 12 at page 449 for an explanation.

If this is not the problem, can you post some more code and be more specific about the problem??

Regards,

Imar




---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Thanks Imar for prompt reply.

2nd try out is on Page 451. I want to redirect Members after successful login to home.asp and Administrators to admin/admin.asp after they login. I have changed the code in login.asp and just added the IF structure. And it is working for Administrators properly but it is not working for Members. Members log in okay but they see Login page again instead of home.asp.

Thanks,
Omer
Reply With Quote
  #4 (permalink)  
Old July 18th, 2003, 08:07 AM
Imar's Avatar
Wrox Author
Points: 65,681, Level: 100
Points: 65,681, Level: 100 Points: 65,681, Level: 100 Points: 65,681, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 15,966
Thanks: 64
Thanked 1,349 Times in 1,329 Posts
Default

Hi Omer,

Did you read the instructions on page 449? If you did, and they didn't help, can you please post the (relevant) code for the login.asp page?

It's hard for me to guess where you are, what you have changed, which steps you have performed and what is causing the problem, without a good description and some of the code......

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #5 (permalink)  
Old July 18th, 2003, 11:29 AM
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar thanks again for your help.

I read page 449 instructions carefully this time and followed them.
I also changed my code for 2nd try out and it is working now properly.

Thanks,
Omer
Reply With Quote
  #6 (permalink)  
Old July 18th, 2003, 11:31 AM
Imar's Avatar
Wrox Author
Points: 65,681, Level: 100
Points: 65,681, Level: 100 Points: 65,681, Level: 100 Points: 65,681, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 15,966
Thanks: 64
Thanked 1,349 Times in 1,329 Posts
Default

You're welcome.

Glad it worked out OK.

Regards and have a nice weekend.

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM
Chapter 12 .MAttButler BOOK: Professional Web Parts and Custom Controls ASP.NET ISBN: 0-7645-7860-X 5 September 10th, 2006 08:31 PM
Errors on Chapter 12 example(12.8) sonnie ASP.NET 2.0 Professional 2 June 7th, 2006 10:55 AM
Chapter 12 Koga VB.NET 2002/2003 Basics 0 November 2nd, 2004 10:43 PM



All times are GMT -4. The time now is 04:05 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.