I have got the followong error on my first asp.net project:
"ASP.NET runtime error: Unrecognized configuration section system.web/profiles. (...~web.config line 68) "
The page directives of my other files (apart from the web.config file) are also marked as error.
eg.
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="A Welcome Page" %>
Any suggestions? Thanks.
My web.config page:
<?
xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<
configuration>
<
appSettings/>
<
connectionStrings/>
<
system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<
authorization>
<
deny users="?" />
</
authorization>
<
roleManager enabled="true" />
<
compilation debug="true"/>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<
authentication mode="Forms" />
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<
membership>
<
providers>
<
remove name="AspNetSqlMembershipProvider"/>
<
add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="LocalSqlServer"
minRequiredPasswordLength="5"
minRequiredNonalphanumericCharacters="0"
passwordStrengthRegularExpression=""
/>
</
providers>
</
membership>
<
siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
<
providers>
<
add name="XmlSiteMapProvider"
description="Default SiteMap provider."
type="System.Web.XmlSiteMapProvider"
siteMapFile="Web.sitemap"
securityTrimmingEnabled="true" />
</
providers>
</
siteMap>
<
namespaces>
<
add namespace="System" />
<
add namespace="System.Collections" />
<
add namespace="System.Collections.Specialized" />
<
add namespace="System.Configuration" />
<
add namespace="System.Text" />
<
add namespace="System.Text.RegularExpressions" />
<
add namespace="System.Web" />
<
add namespace="System.Web.Caching" />
<
add namespace="System.Web.SessionState" />
<
add namespace="System.Web.Security" />
<
add namespace="System.Web.Profile" />
<
add namespace="System.Web.UI" />
<
add namespace="System.Web.UI.Imaging" />
<
add namespace="System.Web.UI.WebControls" />
<
add namespace="System.Web.UI.WebControls.WebParts" />
<
add namespace="System.Web.UI.HtmlControls" />
</
namespaces>
<
profiles>
<
properties>
<
add name ="FirstName" type ="System.String"/>
<
add name ="LastName" type ="System.String"/>
<
add name ="Address1" type ="System.String"/>
<
add name ="City" defaultValue ="Addis Ababa" type ="System.String"/>
<
add name ="Province" type ="System.String"/>
<
add name ="Country" defaultValue ="Ethiopia" type ="System.String"/>
</
properties>
</
profiles>
</
system.web>
</
configuration>