Wrox Programmer Forums
|
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
 
Old September 20th, 2003, 09:01 AM
Registered User
 
Join Date: Sep 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Login Failure

Hi

Im having problems with authentication from Chapter 5.

I have implemented the code into my own project exactly as provided in ThePhile project. I'm able to register as a new user in the database. The page goes back to default and displays the name in the header with which I registered.

However, if I sign out or try to login again using the login page with the credentials that I originally registered, it always fails. Error message is "Login failed for email address".

Ive triple checked my code...

what else should I be checking????

Any help would be greatly appreciated!!!

Thanks
 
Old September 23rd, 2003, 12:05 AM
Authorized User
 
Join Date: Jul 2003
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try deleting the localhost cookie in your cookies folder... If your running thephile on your local machine.



 
Old September 24th, 2003, 07:38 AM
Registered User
 
Join Date: Sep 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

THE FOLLOWING IS THE ERROR I GET DURING LOGIN:
Any help would be gratefull. I ve done all the changes is
the config modules already with no success.



Error

--------------------------------------------------------------------------------
An unexpected error has occurred on this page.The system administrators have been notified.

The error occurred in:
http://localhost/ThePhileVB/WebModul...nts/Login.aspx

Error Message:
Access to the path "C:\wrox\ThePhileVB\Config\Accounts.Config" is denied.

Error Stack:
System.UnauthorizedAccessException: Access to the path "C:\wrox\ThePhileVB\Config\Accounts.Config" is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String str)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode)
   at Wrox.WebModules.Accounts.Configuration.ModuleConfi g.GetSettings() in C:\wrox\ThePhileVB\WebModules\Accounts\Accounts.Co nfiguration\ModuleConfig.vb:line 38
   at Wrox.WebModules.Accounts.Business.SitePrincipal.Va lidateLogin(String emailAddress, String password) in C:\wrox\ThePhileVB\WebModules\Accounts\Accounts.Bu siness\SitePrincipal.vb:line 79
   at Wrox.WebModules.Accounts.Web.Login.Submit_Click(Ob ject sender, EventArgs e) in C:\wrox\ThePhileVB\WebModules\Accounts\Login.aspx. vb:line 83
   at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   at System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument)
   at System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
   at System.Web.UI.Page.ProcessRequestMain()


 
Old November 1st, 2003, 02:00 PM
Authorized User
 
Join Date: Jul 2003
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try setting <identity impersonate="false" /> in the web.config file
 <customErrors
    mode="RemoteOnly"
    />
    <identity impersonate="false" /> <!-- AUTHENTICATION
          This section sets the authentication policies of the application. Possible modes are "Windows",
          "Forms", "Passport" and "None"

          "None" No authentication is performed.
          "Windows" IIS performs authentication (Basic, Digest, or Integrated Windows) according to
           its settings for the application. Anonymous access must be disabled in IIS.
          "Forms" You provide a custom form (Web page) for users to enter their credentials, and then
           you authenticate them in your application. A user credential token is stored in a cookie.
          "Passport" Authentication is performed via a centralized authentication service provided
           by Microsoft that offers a single logon and core profile services for member sites.
    -->
    <authentication mode="Forms">

//---------------------------------------------------

On my machine if impersonate is set to true with IIS Directory Security Anonymous access "checked" then thephile doesn't work. However if I use <identity impersonate="true" /> and use IIS Directory Security Anonymous "unchecked" and Integrated Windows authentication "checked" the site loads fine.

 
Old November 30th, 2003, 04:29 PM
Authorized User
 
Join Date: Nov 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Error Message:
Access to the path "C:\wrox\ThePhileVB\Config\Accounts.Config" is denied.
------------------------------------------------------------------
Is this still an issue?
Try after giving ASPNET access to the file C:\wrox\ThePhileVB\Config\Accounts.Config using windows explorer.

Thanks
Musa

 
Old January 22nd, 2004, 01:58 AM
Authorized User
 
Join Date: Dec 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

change the FileStream constuctors in the ModuleConfig.cs files to the following:

FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);



 
Old November 1st, 2005, 08:33 PM
Registered User
 
Join Date: Oct 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey, that worked a treat. Thanks for the tip!






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
login failure yasminnnnn BOOK: ASP.NET Website Programming Problem-Design-Solution 2 February 27th, 2007 04:16 AM
How to determine login success or failure? kscase VB Databases Basics 1 January 22nd, 2007 02:31 PM
Another Login failure Bo.B.B BOOK: Beginning VB.NET Databases 6 July 10th, 2005 04:02 AM
Chapter 15 Forum Login Failure Indigo11 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 2 November 30th, 2004 12:22 PM





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