Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET Website Programming Problem-Design-Solution
This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution 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
  #1 (permalink)  
Old May 19th, 2004, 09:37 AM
Authorized User
 
Join Date: Jul 2003
Location: Memphis, TN, USA.
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default Login Failed for Email ???

I have thePhile working fine on my local machine. I have
also started building a "companion" app for my own project
and I have the new.aspx working fine and loading new account
info, redirecting to the default page and showing the new
name info in the header.

But when I try to login with this new account info on the login
page, I get a "login failed for email_____" message.
I have checked and re-checked my code, stored procedures, and
database tables.

I there anything out of the ordinary (sql permissions, folder
permissions, etc) or specialized files in the app that I need to
be checking? I saw a post where someone suggested making changes
in the fs(filestream) code lines--but again, thePhile original site
works fine without this type of modification.

I am working in VB version code.
Thx much,


R Corcoran, Jr.
__________________
Reid C.
  #2 (permalink)  
Old May 23rd, 2004, 04:16 PM
Registered User
 
Join Date: Feb 2004
Location: London, , United Kingdom.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am having exactly the same problem and its driving me mad. I trace the password being sent to the database when logging in as exactly the same binary number as when creating the account. The stored procedure is always returning a -1 value to say the email address and password has not been authenticated.

I cannot seem to find why it will not authenticate. The app, accounts table and stored proc follows exactly the same model as the Phile so not sure why it will not authenticate.

Reidcor - if you find the solution please let me know and I would do likewise. Any suggestions from anyone else would be appreciated.

thanks,

DoonBug

  #3 (permalink)  
Old May 23rd, 2004, 08:05 PM
Authorized User
 
Join Date: Jul 2003
Location: Memphis, TN, USA.
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If anyone out there who is a 'thePhile' expert has any advice
on this I would--so would DoonBug--really appreciate hearing your
thoughts. Can anyone suggest a possible problem with the way the
app is set up vis-a-vis sql server, or the database itself.
I have checked and re-checked SitePrincipal.vb, SiteIdentity.vb,
web.config, global.asax.vb, user.vb in both accounts.data and
accounts.business, accounts.config, login.aspx.vb and all others
I think might affect the authentication. No difference in my code
and the original 'thePhile' site.

The ONE THING I have done differently is change "FirstName" and
"LastName" in the accounts constructors and methods to other
names for my use...but I have been very careful to make those
changes in all needed places like the datatable, storedprocs, and
all methods and constructors and properties.

I'm at a loss now for where to look. If 'new.aspx' will create a user
and put it's info in the datatable and redirect to 'default-
.aspx' and show the correct personalization info in the header
control; but then login.aspx won't accomplish the authentication,
can anyone think of what file in the site or what in the database
might cause this to happen?
Thx. much,


R Corcoran, Jr.
  #4 (permalink)  
Old May 24th, 2004, 01:54 PM
Registered User
 
Join Date: Feb 2004
Location: London, , United Kingdom.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm going bloody mad trying to work this one out. I can't see any hidden permissions or extra features Wrox put into the database to make this work. The code between my app and the Phile in login.aspx, the business.user class, the data.user class and the dbobject class are all now completely identical.

The new user gets created no problem but the login.aspx will not authenicate. I step through the authentication and the encrypted password is exactly the same as it is when the user is created.

Until I can get my app to authenticate i'm a sitting duck! Argh please help someone!

  #5 (permalink)  
Old May 24th, 2004, 10:00 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Run this in Query Analyzer (make sure you select ThePhile database first):

declare @result int
exec @result=sp_Accounts_ValidateLogin "admin@thephile.com",
     0x83FDC59FA5C6B8A74F8C097864789AE52F25C4A3
select @result

If it works, it should return a positive integer. If it fails it returns -1. The failure is because 1) the Account_Users table isn't populated right or 2) The stored procedure isn't right.

This should show the 2 values I hardcoded above (for each user you have loaded):

select EmailAddress, password from Accounts_Users

Eric
  #6 (permalink)  
Old May 25th, 2004, 03:48 AM
Registered User
 
Join Date: Feb 2004
Location: London, , United Kingdom.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok I found the prob in the Stored Proc. It needs QUOTED_IDENTIFIER ON and ANSI_NULLS off before running:

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS OFF
GO
CREATE PROCEDURE sp_Accounts.....
......
ELSE
RETURN -1
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON

Now my stored procedure authenticates the email address and binary password.

DoonBug


  #7 (permalink)  
Old May 25th, 2004, 11:32 AM
Authorized User
 
Join Date: Jul 2003
Location: Memphis, TN, USA.
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry to be dense, but you both lost me here...
DoonBug, what stored proc did you modify and
how did you do it?

Eric, how do I run this...I'm sort of a novice
with Query Analyzer...also you mentioned "...select
'thePhile' database first..." but my problem is
not w/ 'thePhile' but with my own databse...are
you saying test both like this, but 'thePhile' first?
Thx,

R Corcoran, Jr.
  #8 (permalink)  
Old May 25th, 2004, 11:51 AM
Authorized User
 
Join Date: Jul 2003
Location: Memphis, TN, USA.
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default

False alarm...I tried what you both suggested and it works like
a charm...thanks again!

Good luck, DoonBug...

Eric, once again, thanks a mil. and I hope to return the
favor someday!
Thx,

R Corcoran, Jr.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Login failed for user. Protoman Classic ASP Databases 3 January 13th, 2008 01:23 PM
login failed for user nt authority\anonymous login rj1406 Classic ASP Databases 1 October 24th, 2004 09:15 AM





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