The stored procedure 'dbo. aspnet_checkschemaversion' cannot be found in ASP. NET profile'

Source: Internet
Author: User

This morning, we performed a profile test. The webconfig configuration is as follows:

 

Code
< Configuration >
< Appsettings />
< Connectionstrings >
< Add name = " Mssqlconnstring " Connectionstring = " Server = WSH-S0712002 \ sql2005; user id = sa; Password = cjchnwscq53b4y; database = replaceshop; min pool size = 4; Max pool size = 4; packet size = 3072 " Providername = " System. Data. sqlclient " > </ Add >
</ Connectionstrings >
< System. Web >
< Compilation debug = " True " />
< Authentication Mode = " Forms " />
< Anonymousidentification Enabled = " True " />
< Profile Enabled = " True " Automaticsaveenabled = " False " Defaultprovider = " Supperstudentprovider " >
< Providers >
< Add name = " Supperstudentprovider " Connectionstringname = " Mssqlconnstring " Type = " System. Web. profile. sqlprofileprovider " Applicationname = " Replaceshop 1.0. " />
</ Providers >
< Properties >
< Add name = " Favoritecolor " Allowanonymous = " True " Defaultvalue = " Red " Provider = " Supperstudentprovider " />
</ Properties >
</ Profile >
</ System. Web >
</ Configuration >

 

 

Code
// Anonymous. aspx

<% @ Page Language = " C # "   %>

< Script runat = " Server " >

Void Login (Object S, eventargs E)
{
Formsauthentication. setauthcookie ("Bill",False);
Response. Redirect (request. Path );
}

Void Logout (Object S, eventargs E)
{
Formsauthentication. signout ();
Response. Redirect (request. Path );
}

Void Updateprofile (Object S, eventargs E)
{
Profile. favoritecolor=Txtfavoritecolor. text;
}

Void Page_prerender ()
{
Lblusername. Text=Profile. Username;
Lblfavoritecolor. Text=Profile. favoritecolor;
}

</ Script >

< Html >
< Head >
< Title > Anonymous </ Title >
</ Head >
< Body >
< Form ID = " Form1 " Runat = " Server " >

< ASP: button ID = " Button1 "
Text = " Login "
Onclick = " Login "
Runat = " Server "   />
< ASP: button ID = " Button2 "
Text = " Logout "
Onclick = " Logout "
Runat = " Server "   />
< HR />
< ASP: textbox
ID = " Txtfavoritecolor "
Runat = " Server "   />
< ASP: button ID = " Button3 "
Text = " Update Profile "
Onclick = " Updateprofile "
Runat = " Server "   />
< HR />
< B > Username: </ B >
< ASP: Label
ID = " Lblusername "
Runat = " Server "   />
< BR />
< B > Favorite color: </ B >
< ASP: Label
ID = " Lblfavoritecolor "
Runat = " Server "   />

</ Form >
</ Body >
</ Html >

 

The following error is found:

Stored Procedure 'dbo. aspnet_checkschemaversion' not found'

Solution:

Navigate to the directory c: \ windows \ Microsoft. NET \ framework \ v2.0.50727and execute aspnet_regsql.exe. Be sure to select the database (consistent with the connectionstring in webconfig)

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.