Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 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 September 18th, 2006, 08:39 AM
Registered User
 
Join Date: Sep 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Login failure - Wrox Photo Album

Hi All, Received my book this morning and set about having a go with the wrox photo album project. I read the chapter from beginning to end and fully understand the code. I set about first installing the self installing setup file on my production server from the CD at the back of the book. My server is running windows server 2003 and IIS6.0. server running service pack 1. It installed the application into a virtual folder off the default web site called PhotoGallery. I set the asp.net property to v2.0.50727 and the application loaded ok when i launced IE with http://localhost/PhotoGallery but when i clicked on the admin menu and typed in the user 'SuperAdmin' and password 'password#' it responded with 'Your login attempt was not sucessful, please try again' ... I tried afew times with same result.
So I went about copying the source code files onto my development pc and copied the files into a new website and launced with Visual Studio 2005. when i build and run the same application from within visual studio and try teh login, it works perfectly well. So I guess the problem is somewhere on the installed version of the application on my IIs server. Can anyone please help me get it running?

 
Old September 18th, 2006, 09:14 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi devman,

This sounds like a familiar problem that has been reported with the CMS and BugBase applications: http://p2p.wrox.com/topic.asp?TOPIC_ID=43384

http://p2p.wrox.com/topic.asp?TOPIC_ID=42379

(The second link is a pretty long post)

Can you access the database on the Windows Server with something like the SQL Server Management Studio? If so, can you take a look in the aspnet_Applications table and in the aspnet_Roles table?

If not, let me know and I'll try to install the app here and reproduce the problem. I didn't write this chapter, so I don't have the app currently installed.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old September 19th, 2006, 03:11 AM
Registered User
 
Join Date: Sep 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar, Many thanks for having a look into this for me. OK I have SQL server management studio express installed on my IIS server. Attached to the database in the folder c:\inetpub\wwwroot\photogallery\app_data\aspnetdb. mdf and can look at all the tables. the table aspnet_Applications has one entry, the ApplicationName column is set to '/' and the LoweredApplicationName column also has '/' in it, no more charactors just a slash. I also opened the aspnet_Roles table which has two entries, the ApplicationID & RoleID are both encryted, there is an entry in the RoleName column of 'Administrator' and also 'Super Administrator' and also the column LoweredRoleName repeats these entries but all in lower case.
I checked those two other topics, but because they are different and I am fairly new to asp.net I dont fully understand what I need to change inside the web.config file.

 
Old September 19th, 2006, 03:21 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Can you check one more thing before I look into this"

The ApplicationId is not encrypted; it's a GUID and they are supposed to look so weird. Does the Id of the aspnet_Applications table match with the ApplicationId column in the aspnet_Roles table?

If they do, I don't know what's going on and I'll install the app and see what's going on...

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old September 19th, 2006, 03:48 AM
Registered User
 
Join Date: Sep 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar,
Yes they appear to be the same, they are quite long so I copied and pasted them into a text file to check:

575f5a2a-b4a2-4d3a-9be2-591158d3adbe

575f5a2a-b4a2-4d3a-9be2-591158d3adbe

The Application ID matches on both the Super Administrator & Administrator role.

Im baffled, but convinced its something to do with the path bit, do you think it might be anything to do with it hanging off the default web site as a virtual web site

 
Old September 19th, 2006, 03:50 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yes, I think so too. I think it has to do with the applicationName in the web.config and database.

I'll install the app and let you now. This may take some time though (half a day, or so)

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old September 19th, 2006, 04:10 AM
Registered User
 
Join Date: Sep 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK no problem, I am here all day so will await your test results. Many thanks for helping - appreciated!

 
Old September 19th, 2006, 07:13 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hmmm, I don't understand what's going on yet. I just installed the Photo Gallery with the installer, and things worked fine for me. I can login with the SuperAdmin account. Also, indeed the correct stuff is in the database tables.

The only difference is that I installed in on Windows XP, because I don't have Windows Server 2003 running with a version of SQL Server Express. I'll try that one later in a Virtual PC.

In the mean time, can you tell me how the security settings for the PhotoGallery and the PhotoGallery/App_Data folder of the website look like in Windows Explorer?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old September 19th, 2006, 09:03 AM
Registered User
 
Join Date: Sep 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar,
Not sure what you mean by security settings in windows explorer? What should i be looking for?

 
Old September 19th, 2006, 09:17 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Take a look at page 163 and 164. It explains how to change the security settings for the CMS application.

The same principle applies to the Photo ALbum; that is, you need to grant write permissions for the Network Service account (Server 2003) or ASPNET (Windows XP) to the App_Data folder and the Upload folder.

Have you done this already? What accounts do you see for the App_Data folder in the Security tab?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Photo login failure pchee373 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 5 June 29th, 2007 02:25 PM
Photo Album Questions m3ben BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 April 4th, 2007 12:12 PM
Error posting photo to photo album abel714 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 10 February 5th, 2007 03:07 AM
Wrox Photo Album Help rsearing BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 6 September 27th, 2006 02:30 PM





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