954,184 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Website Login

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.

<authentication mode="Forms" />
 		  <Forms name=".ASPXSession" loginUrl="FacLogin.aspx" protection="All" />
 			<credentials passwordFormat = "Clear"> 
 				 
 <user name="admin" password="admin"/> 				 
 			</credentials>
 		</forms>	
 		</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 :sad:

Slade
Practically a Master Poster
633 posts since Mar 2004
Reputation Points: 115
Solved Threads: 7
 

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

<authentication mode="Forms" />
 		  <Forms name=".ASPXSession" loginUrl="FacLogin.aspx" protection="All" />
 			<credentials passwordFormat = "Clear"> 
 				 
 <user name="admin" password="admin"/> 				 
 			</credentials>
 		</forms>


change the

it can be as simple as a capital letter in wrong place that will throw it off. At least that has been my experience!

Paladine
Master Poster
Team Colleague
824 posts since Feb 2003
Reputation Points: 211
Solved Threads: 27
 

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

Slade
Practically a Master Poster
633 posts since Mar 2004
Reputation Points: 115
Solved Threads: 7
 

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 <strong>HttpResponse.Cookies</strong>  = FormsAuthentication.Authenticate then
imgButton1.visible = true



Is that on the right track? Any ideas guys?

Slade
Practically a Master Poster
633 posts since Mar 2004
Reputation Points: 115
Solved Threads: 7
 

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!

Paladine
Master Poster
Team Colleague
824 posts since Feb 2003
Reputation Points: 211
Solved Threads: 27
 

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?

Paladine
Master Poster
Team Colleague
824 posts since Feb 2003
Reputation Points: 211
Solved Threads: 27
 

try this :

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

cheers

priyesh.gupta
Newbie Poster
1 post since Mar 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You