Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 May 22nd, 2006, 09:10 AM
Registered User
 
Join Date: May 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error in authenticating web form

Hi all


I am not that proficient in ASP.NET. Here I have a problem. I am doing authentication of the login form. Look at my code below.

IN the web.config file

<authentication mode="Forms">
<forms name="login.aspx" loginUrl=".ASPXAUTH">
<credentials passwordFormat="Clear">
<user name="devhood" password="password"/>
</credentials>
</forms>
</authentication>
<authorization>
<allow users="devhood"/>
<deny users="?"/>
</authorization>

Now I want to dispaly another form webform1.aspx when submit button in the login form is clicked. My code is as below

private sub button1_click(
ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

if formsauthentication.authenticate(txtusername.text, txtpassword.text) then

formsauthentication.redirectfromloginpage(txtusern ame,false)
else
'error message'

end if
end sub

But when I click the submit button it throws the error
"Error\n application
HTTP error 404

check the following url
\default.aspx"

Just let me know where I am making mistake . Is there any mistake in my authentication setting procedure. I feel I am making some mistake in the authentication procedure.

Thanks for help in advance.





Similar Threads
Thread Thread Starter Forum Replies Last Post
WCF Authenticating users from Database irfanb2000 BOOK: Professional WCF Programming: .NET Dev with Windows Communication Found ISBN: 9780470089842 1 May 7th, 2008 05:36 PM
error authenticating to active directory planeswalk ASP.NET 1.0 and 1.1 Professional 2 June 2nd, 2005 02:49 AM
authenticating users sentme_mail Flash (all versions) 6 November 15th, 2004 10:11 PM
Authenticating against Active Directory JamiebearT VB How-To 4 September 22nd, 2003 11:06 AM
Authenticating Windows Password cooky4 VB How-To 0 September 8th, 2003 01:22 PM





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