943,916 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 7947
  • ASP.NET RSS
May 12th, 2004
0

Website Login

Expand Post »
Hi,
On my asp .net site, I want a login page so that when the user is logged in, a few extra links are made visible on the header control (.ascx). Also, there will only be about 4-6 users logging in here, I also want to give each one the ability to edit their own info from a database table. I have allready tried "Forms" authentication and this is what happens.

ASP.NET Syntax (Toggle Plain Text)
  1. <authentication mode="Forms" />
  2. <Forms name=".ASPXSession" loginUrl="FacLogin.aspx" protection="All" />
  3. <credentials passwordFormat = "Clear">
  4.  
  5. <user name="admin" password="admin"/>
  6. </credentials>
  7. </forms>
  8. </authentication>
Of course, this doesn't work, making me really quite angry and frustrated. The error message I receive is as follows:

Parser Error Message: Unrecognized configuration section 'forms'


There is little or no documentation on this error and I feel like killing myself someone.

Please help
Similar Threads
Reputation Points: 115
Solved Threads: 7
Practically a Master Poster
Slade is offline Offline
633 posts
since Mar 2004
May 13th, 2004
1

Re: Website Login

Just a long shot but fix one thing and let me know the result:

ASP.NET Syntax (Toggle Plain Text)
  1. <authentication mode="Forms" />
  2. <Forms name=".ASPXSession" loginUrl="FacLogin.aspx" protection="All" />
  3. <credentials passwordFormat = "Clear">
  4.  
  5. <user name="admin" password="admin"/>
  6. </credentials>
  7. </forms>

change the <Forms name=".ASPXSession".... to <forms name=".ASPXSession"...

it can be as simple as a capital letter in wrong place that will throw it off. At least that has been my experience!
Team Colleague
Reputation Points: 211
Solved Threads: 27
Master Poster
Paladine is offline Offline
793 posts
since Feb 2003
May 14th, 2004
0

Re: Website Login

hi, I ended up fixing that one. What happened was, I didn't realize the sensitivity of the program an dso I just copied code directly off the net, of course, space characters and whatever else was included in this, hence the error. I ended just retyping the whole lot, then it worked fine.


Thanks for the help tho!

Slade
Reputation Points: 115
Solved Threads: 7
Practically a Master Poster
Slade is offline Offline
633 posts
since Mar 2004
May 14th, 2004
0

Re: Website Login

What I want of my login system is that when a user is logged in (there is only about 5 and all are declared in the web.config), I want two more imagebuttons to appear in the header, what code will I need to do that?

N.B. I'm using VB .NET
if HttpResponse.Cookies  = FormsAuthentication.Authenticate then
imgButton1.visible = true
Is that on the right track? Any ideas guys?
Reputation Points: 115
Solved Threads: 7
Practically a Master Poster
Slade is offline Offline
633 posts
since Mar 2004
May 14th, 2004
0

Re: Website Login

I notice from several of your posts that you have the user set the specific controls they want on the site. Interesting, but you are giving up a great deal of control to the user, and thus making your work harder.

You should have standard template pages ,that have themes to them (i.e. styles) that the user can select, but keep them to a minimum.

But then this is just suggestion... I am not sure of what you are trying to ultimately do. Only guessing...

But from the code you have provided I would say you are on the right track!
Team Colleague
Reputation Points: 211
Solved Threads: 27
Master Poster
Paladine is offline Offline
793 posts
since Feb 2003
May 14th, 2004
0

Re: Website Login

On one other thing. Are you setting all the user authenication data in the web.config file? Why not use an access DB to store this?
Team Colleague
Reputation Points: 211
Solved Threads: 27
Master Poster
Paladine is offline Offline
793 posts
since Feb 2003
Mar 13th, 2009
0

Re: Website Login

try this :
<authentication mode="Forms" >
<Forms name=".ASPXSession" loginUrl="FacLogin.aspx" protection="All" />
<credentials passwordFormat = "Clear">
</authentication>

your authentication tag is being closed and hence it doesnot encapsulate the <forms > tag .. and hence your web.config is not being parsed correctly

cheers
Reputation Points: 10
Solved Threads: 0
Newbie Poster
priyesh.gupta is offline Offline
1 posts
since Mar 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: c language tirnary operator(?:)
Next Thread in ASP.NET Forum Timeline: get logged in users





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC