Press F5 to generate Web. config
Generate a connection string. The database is generated using c: \ windows \ Microsoft. NET \ framework \ v2.0.50727 \ aspnet_regsql.exe. < Connectionstrings >
< Add Name = "Memconnectionstring1" Connectionstring = "Data Source =.; initial catalog = MEM; persist Security info = true; user id = sa; Password = hicc"
Providername = "System. Data. sqlclient" />
</ Connectionstrings >
In the beginning, there are other such cases.
< System . Web >
<! --
Set compilation DEBUG = "true" to insert the debugging symbol
Compiled pages. However, this
Performance is affected, so this value is only available during development.
Set to true.
-->
< Compilation Debug = "True" />
<! --
In the <authentication> section, you can configure
Security Authentication mode,
To identify the user.
-->
< Authentication Mode = "Windows" />
<! --
If an unprocessed error occurs during request execution,
You can configure the corresponding processing steps in the <mermerrors> section. Specifically,
This section allows developers to configure
HTML error page to be displayed
To replace the error stack trace.
<Customerrors mode = "remoteonly" defaultredirect = "genericerrorpage.htm">
<Error statuscode = "403" Redirect = "noaccess.htm"/>
<Error statuscode = "404" Redirect = "filenotfound.htm"/>
</Customerrors>
-->
</ System. Web >
Modify < System . Web >
<! --
Set compilation DEBUG = "true" to insert the debugging symbol
Compiled pages. However, this
Performance is affected, so this value is only available during development.
Set to true.
-->
< Compilation Debug = "True" />
<! --
In the <authentication> section, you can configure
Security Authentication mode,
To identify the user.
-->
< Authentication Mode = "Forms" />
<! --
If an unprocessed error occurs during request execution,
You can configure the corresponding processing steps in the <mermerrors> section. Specifically,
This section allows developers to configure
HTML error page to be displayed
To replace the error stack trace.
<Customerrors mode = "remoteonly" defaultredirect = "genericerrorpage.htm">
<Error statuscode = "403" Redirect = "noaccess.htm"/>
<Error statuscode = "404" Redirect = "filenotfound.htm"/>
</Customerrors>
-->
< Rolemanager Enabled = "True" Cacherolesincookie = "True" >
< Providers >
< Clear />
< Add Connectionstringname = "Memconnectionstring1" Applicationname = "/" Name = "Aspnetsqlroleprovider" Type = "System. Web. Security. sqlroleprovider, system. Web, version = 2.0.0.0, culture = neutral, publickeytoken = b03f5f7f11d50a3a" />
</ Providers >
</ Rolemanager >
< Membership Defaultprovider = "Aspnetsqlmembershipprovider" Userisonlinetimewindow = "15" Hashalgorithmtype = "" >
< Providers >
< Clear />
< Add Connectionstringname = "Memconnectionstring1" Enablepasswordretrieval = "False" Enablepasswordreset = "True" Requiresquestionandanswer = "True" Applicationname = "/" Requiresuniqueemail = "False" Passwordformat = "Hashed" Maxinvalidpasswordattempts = "5" Minrequiredpasswordlength = "7" Minrequirednonalphanumericcharacters = "1" Passwordattemptwindow = "10" Passwordstrengthregularexpression = "" Name = "Aspnetsqlmembershipprovider" Type = "System. Web. Security. sqlmembershipprovider, system. Web, version = 2.0.0.0, culture = neutral, publickeytoken = b03f5f7f11d50a3a" />
</ Providers >
</ Membership >
</ System. Web >
Website> ASP. NET configuration> Security .......
You can set it ~~~~~~~~~
So touched ~~~~ This is another issue that Zhu Ge does not understand and helps me solve ~~~~