使用.net 4.0和.net 2.0的aspstate

问题描述:

我在我的开发机器上设置了一些遗留的.net 2.0网站网站。我一直在开发一个4.0工作正常的网站。在这两种情况下,使用相同的会话数据库。使用.net 4.0和.net 2.0的aspstate

如果我访问2.0站点停止了4.0网站的运行,给这个错误:

Unable to use SQL Server because either ASP.NET version 2.0 Session State is not installed on the SQL server, or ASP.NET does not have permission to run the dbo.TempGetVersion stored procedure. If the ASP.NET Session State schema has not been installed, please install ASP.NET Session State SQL Server version 2.0 or above. If the schema has been installed, please grant execute permission on the dbo.TempGetVersion stored procedure to either the ASP.NET application pool identity, or the Sql Server user specified in the sqlConnectionString attribute.

重新启动4.0站点再次工作,直到2.0的网站加载机后。重置IIS不会重置问题 - 我发现的唯一方法是重新启动计算机。

4.0网站使用自己的应用程序池,并且网站使用不同的用户连接到数据库(虽然是同一组的一部分)。

任何人都可以描述发生了什么?

+0

根据我的[阅读](也许是http://sqlblog.com/blogs/aaron_bertrand/archive/2010/09/10/a-quick-workaround-to-a-misleading-aspstate-problem.aspx),也许你只需要创建该存储过程 – billinkc

在别人遇到同样问题时应答。这些网站在同一网站下运行,但是作为不同的应用程序,不同的应用程序池和不同的用户。一旦我创建了一个全新的网站,一切工作。我仍然不明白发生了什么,但那绝对是一个解决方案。