ASP.NET profile之 找不到存储过程'dbo.aspnet_CheckSchemaVersion'
2010-02-10 11:14
507 查看
完成profile的webconfig配置后,运行时出现【找不到存储过程'dbo.aspnet_CheckSchemaVersion' 】错误。
我的web.config配置如下:
<connectionStrings>
<add name="con1" connectionString="Data Source=HASO33CN/SQLEXPRESS;Initial Catalog=db_NetShop;
Persist Security Info=True;User ID=sa;PWD=1;" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<compilation debug="true" />
<authentication mode="Windows" />
<profile automaticSaveEnabled="true" defaultProvider="SqlProvider">
<providers>
<clear/>
<add name="SqlProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="con1" applicationName="/"/>
</providers>
<properties>
<add name="NNNN" serializeAs="Xml" provider="SqlProvider" ></add>
</properties>
</profile>
</system.web>
程序调试代码:
protected void Page_Load(object sender, EventArgs e)
{
Profile.NNNN = "gxs";
}
出现如下错误:
找不到存储过程 'dbo.aspnet_CheckSchemaVersion'。
解决方法:
在C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727目录下启动aspnet_regsql.exe,然后按照配置文件中的连接字串(web.config中的connectionStrings)进行配置,注意选中要用的数据库。
测试:
打开SqlServer2005,在数据库中发现多了几十张表,其中有aspnet_Profile。另外发现多了几十个存储过程,其中有aspnet_CheckSchemaVersion存储过程。
打开aspnet_Profile表:【Profile.NNNN = "gxs"】记录被保存在该表中。
我的web.config配置如下:
<connectionStrings>
<add name="con1" connectionString="Data Source=HASO33CN/SQLEXPRESS;Initial Catalog=db_NetShop;
Persist Security Info=True;User ID=sa;PWD=1;" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<compilation debug="true" />
<authentication mode="Windows" />
<profile automaticSaveEnabled="true" defaultProvider="SqlProvider">
<providers>
<clear/>
<add name="SqlProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="con1" applicationName="/"/>
</providers>
<properties>
<add name="NNNN" serializeAs="Xml" provider="SqlProvider" ></add>
</properties>
</profile>
</system.web>
程序调试代码:
protected void Page_Load(object sender, EventArgs e)
{
Profile.NNNN = "gxs";
}
出现如下错误:
找不到存储过程 'dbo.aspnet_CheckSchemaVersion'。
解决方法:
在C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727目录下启动aspnet_regsql.exe,然后按照配置文件中的连接字串(web.config中的connectionStrings)进行配置,注意选中要用的数据库。
测试:
打开SqlServer2005,在数据库中发现多了几十张表,其中有aspnet_Profile。另外发现多了几十个存储过程,其中有aspnet_CheckSchemaVersion存储过程。
打开aspnet_Profile表:【Profile.NNNN = "gxs"】记录被保存在该表中。
相关文章推荐
- 网站的ASP.NET 配置页面无法打开(ASP.NET Configuration)(找不到存储过程 'dbo.aspnet_CheckSchemaVersion')
- ASP.NET profile之 找不到存储过程'dbo.aspnet_CheckSchemaVersion'
- ASP.NET profile之 找不到存储过程dbo.aspnet_CheckSchemaVersion
- 找不到存储过程'dbo.aspnet_CheckSchemaVersion'& aspnet_regsql注册失败
- 未能找到存储过程 'dbo.aspnet_CheckSchemaVersion'问题的解决
- 找不到存储过程'dbo.aspnet_CheckSchemaVersion'
- asp.net MVC错误:uses 'System.Web.WebPages, Version=2.0.0.0, ....which has a higher version...
- 找不到存储过程'dbo.aspnet_CheckSchemaVersion'(两种情况)
- [ASP.NET2.0][数据库更新]How to troubleshoot 'Procedure or function has too many arguments specified' in asp.net 2.0
- Vincent's ASP.NET Cookbook: Get Connected to Database
- ASP.NET 3.5's ListView and DataPager—Part3:用ListView控件排序数据
- ASP.NET AJAX:'sys' 未定义
- ASP.NET中引用dll“找不到指定模块"的完美解决办法[转]
- (翻译) 怎样移除IIS 响应中的 Server, X-AspNet-Version, X-AspNetMvc-Version 和 X-Powered-By
- 如何设置混合身份验证?— —或 'IIS APPPOOL\ASP.NET v4.0' 登录失败
- C# B/S程序中出现“异常详细信息: System.Data.SqlClient.SqlException: 用户 'XXX/ASPNET' 登录失败。”的处理方法
- 关于 sessionState mode='InProc' 不用启动ASP.NET 服务
- 使用Asp.net Ajax时出现'Sys'未定义错误的解决办法
- 错误 MSB3113: 找不到文件 ' Microsoft.Windows.CommonLanguageRuntime, Version = 2.0.50727.0 '
- 在ASP 调用 VB.net 编写的dll 出错 提示:Microsoft VBScript 运行时错误 错误 '800a01ad' ActiveX 部件不能创建对象