ASP.NET State Service 版本有问题;状态服务是1.1,网站是3.5

发布于 2024-08-04 07:03:35 字数 445 浏览 3 评论 0原文

我有一个在 Windows Server 2003 上运行的 ASP.NET 3.5 网站,并且使用 ASP.NET 状态服务来管理会话。它似乎可以工作,然后我经常收到一个错误,说我的代码需要运行 2.0 版的状态服务才能工作(我认为这就是它所说的,我已暂时切换回存储会话 InProc)。刷新页面,错误就会消失(暂时,它肯定会回来)。

因此,我在服务界面中查看了 ASP.NET State Service 的属性,它映射到 1.1 Framework 文件夹中的 .exe:

C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_state.exe

有一个2.0框架文件夹中的相应版本,但我不知道如何将其添加为新服务。我也不确定添加 2.0 版本(并停止和/或删除 1.1 版本)是否可以解决问题。

预先感谢任何人可以提供的任何帮助。

米克

I have a ASP.NET 3.5 website running on Windows Server 2003 and I'm using the ASP.NET State Service to manage sessions. It will appear to be working then I regularly get an error saying my code needs to have version 2.0 of the State Service running to work (I think that's what it said, I've temporarily switched back to storing sessions InProc). Refresh the page and the error goes away (for a bit, it's bound to come back).

So I looked at the properties of the ASP.NET State Service in the Services interface and it's mapping to a .exe in the 1.1 framework folder:

C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_state.exe

There's a corresponding version in the 2.0 framework folder, but I don't know how to add it as a new service. I'm also not sure that adding the 2.0 version (and stopping and/or removing the 1.1 version) will solve the problem.

Thanks in advance for any help anyone can provide.

Mick

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

半山落雨半山空 2024-08-11 07:03:35

我在 Win Server 2003 SP3 上并排运行 ASP.net 4 和 ASP.net 2.0 时遇到了类似的问题,并且全部都在 32 位模式下。

在某个阶段,某些东西从 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 目录中删除了 ASPNET_State,但未能告诉 ASPNET_State 服务器它现在应该指向 C:\WINDOWS\Microsoft.NET\Framework\ v4.0.30319\ASPNET_State.exe。我只能想象是在安装 .Net 4 时,但我不能确定。

所以我运行了

sc config aspnet_state binpath= C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_state.exe

,之后一切似乎都工作正常。

(请注意“binpath=”后面的空格 - 我担心原始帖子的发布者(Mick Byrne)没有将其放入,从而解释了原因......“然而,这根本不起作用,只是提出“sc”命令此分支的使用说明” - 请参阅原始帖子中的评论)

I had a similar problem running ASP.net 4 side by side with ASP.net 2.0 on Win Server 2003 SP3 and all in 32bit mode.

At some stage something nuked the ASPNET_State from the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 directory but had failed to tell the ASPNET_State server that it should now be pointing to C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\ASPNET_State.exe. I can only imagine it was when .Net 4 was installed but I can't be sure.

So I ran

sc config aspnet_state binpath= C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_state.exe

and it all seemed to work fine after that.

(Please note the space after 'binpath= ' - I fear the person who made the original post (Mick Byrne) did not put this in and thus explains why... "However this just doesn't work at all and just brings up the usage instructions for this branch of the 'sc' command" - see comments in original post)

椵侞 2024-08-11 07:03:35

好的,在其他地方找到了似乎有效的解决方案。与上面的答案几乎相同:

  • 在命令提示符下转到.NET2.0目录
  • 运行“aspnet_regiis -i -enable”
  • 计算机坐在那里咀嚼一分钟,然后一切似乎都正常工作。

我在服务控制台中检查了“ASP.NET State Service”,它现在指向 .NET2.0 版本(而不是 .NET1.1)。

我做的唯一奇怪的事情可能导致了这种情况,就是将.NET3.5直接安装到以前只安装了.NET1.1的盒子上。我认为它会一路放入.NET2.0(它确实做到了),但一定忘记了会话的事情。

OK, found a solution somewhere else that appears to have worked. Almost the same as the above answer:

  • Go to .NET2.0 directory in command prompt
  • run 'aspnet_regiis -i -enable'
  • computer sits there chewing for a minute and then it all seems to be working.

I checked the 'ASP.NET State Service' in the Services console and it's now pointing to the .NET2.0 version (not the .NET1.1).

The only strange thing I did that may have led to this scenario was to install .NET3.5 straight onto a box that previously only had .NET1.1 installed. I figured it would put .NET2.0 in along the way (which it kind of did), but must have forgotten about the session thing.

吃素的狼 2024-08-11 07:03:35

您可以从framework 2.0 目录运行aspnet_regiis -? 来更新网站。

You can run aspnet_regiis -? From the framework 2.0 directory to update the web site.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文