Use ASP. NET 2.0 login controls

Source: Internet
Author: User

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 >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.