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

Unrecognized configuration section 'forms'

How to fix this error?

I'm trying to use forms authentication to allow users to access different parts of a site and I have the following code in the web.config file:

Error:

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Unrecognized configuration section 'forms'

Source Error:


Line 38: -->
Line 39:
Line 40:

maxtrixx
Newbie Poster
11 posts since Jun 2004
Reputation Points: 10
Solved Threads: 0
 

You're closing the authentication section and then adding another authentication line ;-). Change it to this:

<authentication mode="Forms"> 
	<forms name=".MyCookie" loginUrl="myaccount.aspx" protection="All" timeout="15" path="/"/>
</authentication>
Tekmaven
Software Architect
Moderator
1,274 posts since Feb 2002
Reputation Points: 322
Solved Threads: 28
 

I am having the same issue as the other person in the thread. I am working with a product called IssueManager, I have converted from version 2 (VB) to version 4 which is in C#. I was able to solve many of the problems but i am stuck on the last 6...they all have the same error message:
Unrecognized configuration section authentication. (D:\Inetpub\wwwroot\QA\im4\web.config line 81)
Unrecognized configuration section membership. (D:\Inetpub\wwwroot\QA\im4\web.config line 85)
Unrecognized configuration section roleManager. (D:\Inetpub\wwwroot\QA\im4\web.config line 100)
Unrecognized configuration section compilation. (D:\Inetpub\wwwroot\QA\im4\web.config line 113)
Unrecognized configuration section httpHandlers. (D:\Inetpub\wwwroot\QA\im4\web.config line 130)
Unrecognized configuration section httpModules. (D:\Inetpub\wwwroot\QA\im4\web.config line 136)

sample of the first one:
Line 79:
Line 80:
Line 81:
Line 82:
Line 83:

I have checked the IIS settings and it is using ASP.NET 2.0. What other suggestion do you have? The code is generated by the conversion process using a product called CodeChargeStudio 4.0.

dmarino1
Newbie Poster
9 posts since Jul 2008
Reputation Points: 10
Solved Threads: 0
 

I need you to post your entire web.config file. The issue goes deeper then what you've posted.

Also, what you've done is considered "thread hijacking". Proper netiquette states that if you have an issue, you should start your own thread instead of hijacking someone else's thread!

Tekmaven
Software Architect
Moderator
1,274 posts since Feb 2002
Reputation Points: 322
Solved Threads: 28
 

try with this code

<authentication mode="Forms" >

<forms name=".MyCookie" loginUrl="myaccount.aspx"></forms>

</authentication>
sreein1986
Posting Whiz
306 posts since May 2008
Reputation Points: 12
Solved Threads: 34
 

Post the whole thing within <system.web> tag. something like this: <system.web>
<compilation debug="true" />

<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="2880" />
</authentication>
</system.web>

pankhraj
Newbie Poster
1 post since Jul 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: