Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 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
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old September 4th, 2004, 06:34 PM
Registered User
 
Join Date: Sep 2004
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Forms authentication with credentials

Hi guys,
   Recently I bought Pro ASP.net. I am studying forms authentication. Please help me if anyone can solve this problem , i copied exactly code from book to my website for web.config:
<configuration>
<system.web>
  <authentication mode="Forms">
    <forms name="MyApp" path="/" loginUrl="login.aspx"
           protection="All" timeout="10">
      <credentials passwordFormat="Clear">
        <user name="billjones" password="test" />
        <user name="marthasmith" password="test" />
        <user name="joesoap" password="test" />
      </credentials>
    </forms>
  </authentication>

  <authorization>
    <allow users="billjones,marthasmith,joesoap" />
    <deny users="?" />
  </authorization>

</system.web>
</configuration>

and login.aspx below

<%@Page Language="VB" %>
<html>
<head>
<title>Login Form</title>
<style type="text/css">
body, input {font-family:Tahoma,Arial,sans-serif; font-size:10pt }
</style>
</head>
<body>
<form runat="server">
  UserName: <input id="txtUsr" type="text" runat="server" /><p />
  Password: <input id="txtPwd" type="password" runat="server" /><p />
  <ASP:CheckBox id="chkPersist" runat="server" />
  Remember my credentials<p />
  <input type="submit" value="Login" runat="server" onserverclick="DoLogin" /><p />
  <div id="outMessage" runat="server" />
</form>
</body>
</html>

<script language="VB" runat="server">
Sub DoLogin(objSender As Object, objArgs As EventArgs)

  If FormsAuthentication.Authenticate(txtUsr.Value, txtPwd.Value) Then
     FormsAuthentication.RedirectFromLoginPage(txtUsr.V alue, chkPersist.Checked)
  Else
     outMessage.InnerHtml = "<b>Invalid credentials</b> please re-enter..."
  End If

End Sub
</script>
after i use username and password to logon my secure page. there alway has some "!!" followed my others.aspx pages.I can't figure out what's wrong with these code. Thanks all


  #2 (permalink)  
Old September 7th, 2004, 10:39 AM
Friend of Wrox
Points: 3,489, Level: 24
Points: 3,489, Level: 24 Points: 3,489, Level: 24 Points: 3,489, Level: 24
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Central, NJ, USA.
Posts: 1,102
Thanks: 0
Thanked 2 Times in 2 Posts
Default

OK- you need to explain the problem your having a little better- I don't follow what your talking about here.

Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
  #3 (permalink)  
Old September 7th, 2004, 01:31 PM
Registered User
 
Join Date: Sep 2004
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Hal Levy,
   Thanks for your response. My problem is my login.aspx and others.aspx have some "!!" followed on each page. if you go to my website www.kinwaiusa.com, then click DEALER,which link to login.aspx page. you will see some exclamation mark "!" u\psside-down on theses .aspx page.(you can use id "ben" and password"1234" to login. i copy exactly codes from asp.net 1.1 book to learn form authentication. I don't know why have that kind of things on. Please help me. Thanks a lot

Jerry




Quote:
quote:Originally posted by Hal Levy
 OK- you need to explain the problem your having a little better- I don't follow what your talking about here.

Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
  #4 (permalink)  
Old September 7th, 2004, 01:48 PM
Friend of Wrox
Points: 3,489, Level: 24
Points: 3,489, Level: 24 Points: 3,489, Level: 24 Points: 3,489, Level: 24
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Central, NJ, USA.
Posts: 1,102
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I see what you mean now.

If you look at the source code "View Source" you can see that the ° marks are there in the source. I am wondering if you have some kind of extended character in your login.aspx page. IN the actual HTML rather than in the code-behind.



Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
  #5 (permalink)  
Old September 7th, 2004, 02:15 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,111
Thanks: 0
Thanked 3 Times in 3 Posts
Default

I saw this:



near this:

<a href="index.htm">KinwaiUSA.com</a>
      | <a href="help.htm">Help </a>

Also, instead of using all the &nbsp; you can 'center' the above line.

 


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
Forms Authentication thetway Classic ASP Basics 1 August 18th, 2005 06:55 PM



All times are GMT -4. The time now is 08:43 AM.


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