I personally think these controls are not bad, but they cannot meet the needs of big projects. I made a mistake yesterday and put them in. It was too easy to use the aspnetdb database,CodeNo need to write.
The Web. config configuration is as follows:
< Configuration Xmlns = "Http://schemas.microsoft.com/.NetConfiguration/v2.0" >
< Appsettings >
< Add Key = "Maojiguo" Value = "Yes" />
</ Appsettings >
< Connectionstrings >
< Add Name = "Mydbconn" Connectionstring = "Server = (local); trusted_connection = false; user id = sa; Pwd =; database = cigem" Providername = "System. Data. sqlclient" />
< Remove Name = "Localsqlserver" />
< Add Name = "Localsqlserver" Connectionstring = "Server = (local); trusted_connection = false; user id = sa; Pwd =; database = cigem" Providername = "System. Data. sqlclient" />
</ Connectionstrings >
< System . Web >
< Customerrors Defaultredirect = "" />
< Authorization >
< Allow Roles = "Administrator" />
</ Authorization >
< Rolemanager Enabled = "True" />
< Membership Defaultprovider = "Localsqlserver" >
< Providers >
< Add Connectionstringname = "Localsqlserver" Name = "Localsqlserver"
Type = "System. Web. Security. sqlmembershipprovider, system. Web, version = 2.0.0.0, culture = neutral, publickeytoken = b03f5f7f11d50a3a" />
</ Providers >
</ Membership >
<! --
Set compilation DEBUG = "true" to insert debugging
Symbols into the compiled page. Because this
Affects performance, set this value to true only
During development.
-->
< Compilation Debug = "True" />
<! --
The <authentication> section enables Configuration
Of the Security Authentication mode used
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>
-->
</ System. Web >
</ Configuration >