ASP.NET profile之 找不到存储过程'dbo.aspnet_CheckSchemaVersion'
2008-11-04 11:46
417 查看
今天早上做profile的测试,webconfig的配置如下:
<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>
//Anonymous.aspx
<%@ Page Language="C#" %>
<script runat="server">
void Login(Object s, EventArgs e)
void Logout(Object s, EventArgs e)
void UpdateProfile(Object s, EventArgs e)
void Page_PreRender()
</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>
发现如下错误:
找不到存储过程'dbo.aspnet_CheckSchemaVersion'
解决方法:
导航到目录C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727,执行aspnet_regsql.exe,一定要选对数据库(跟webconfig中connectionString中保持一致)
<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>
//Anonymous.aspx
<%@ Page Language="C#" %>
<script runat="server">
void Login(Object s, EventArgs e)
void Logout(Object s, EventArgs e)
void UpdateProfile(Object s, EventArgs e)
void Page_PreRender()
</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>
发现如下错误:
找不到存储过程'dbo.aspnet_CheckSchemaVersion'
解决方法:
导航到目录C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727,执行aspnet_regsql.exe,一定要选对数据库(跟webconfig中connectionString中保持一致)
相关文章推荐
- ASP.NET profile之 找不到存储过程'dbo.aspnet_CheckSchemaVersion'
- ASP.NET profile之 找不到存储过程dbo.aspnet_CheckSchemaVersion
- 网站的ASP.NET 配置页面无法打开(ASP.NET Configuration)(找不到存储过程 'dbo.aspnet_CheckSchemaVersion')
- 找不到存储过程'dbo.aspnet_CheckSchemaVersion'
- 找不到存储过程'dbo.aspnet_CheckSchemaVersion'& aspnet_regsql注册失败
- 未能找到存储过程 'dbo.aspnet_CheckSchemaVersion'问题的解决
- 找不到存储过程'dbo.aspnet_CheckSchemaVersion'(两种情况)
- (翻译) 怎样移除IIS 响应中的 Server, X-AspNet-Version, X-AspNetMvc-Version 和 X-Powered-By
- aspnet_CheckSchemaVersion
- IIS asp.net 中出现未能加载文件或程序集“System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”或它的某一个依赖项。系统找不到指定的文件。
- .NET开发 程序员必备工具 -- ASPNET Version Switcher:ASPNET版本转换器
- v14.0\AspNet\Microsoft.Web.AspNet.Props 找不到
- ASP.net:未能加载文件或程序集“System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一个依赖项。系统找不到指
- AJAX and the ASP.NET 2.0 Callback Framework(English Version)
- Tips&Tricks系列二:找不到Asp.net模板?
- ASP.NET中引用dll“找不到指定模块"的完美解决办法[转]
- 重新过一遍ASP.NET 2.0(C#)(7) - Profile(存储用户配置)
- ASP.NET用户个性化设置Profile——配置1 (转)
- ASP.NET IIS 注册工具 (Aspnet_regiis.exe)
- JSP、ASP.NET和存储过程