为什么我的 64 位服务以 32 位运行?

编程入门 行业动态 更新时间:2024-10-28 18:34:14
本文介绍了为什么我的 64 位服务以 32 位运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个 Windows 服务,但我遇到了这个问题.

I have a Windows Service that I'm having this issue with.

  • 在 Visual Studio 中,我已将其平台目标设置为 64 位
  • 我已经运行 CorFlags 来验证它是否设置正确,我明白了:
Version : v4.0.30319 CLR Header: 2.5 PE : PE32+ CorFlags : 0x1 ILONLY : 1 32BITREQ : 0 32BITPREF : 0 Signed : 0

我什至尝试使用 32BITREQ- 和 32BITPREF- 标志来运行 Corflags,以确保它被设置为它应该是什么,但没有骰子.在 taskManager 中它显示为:

I even tried running Corflags with the 32BITREQ- and 32BITPREF- flags to make sure it was set to what it's supposed to be but no dice. In the taskManager it shows up as:

MyServiceName(32 位)

服务随 Topshelf 3.0 一起安装,并在 Windows Server 2012 R2 Standard 上运行.这是怎么回事?

Service was installed with Topshelf 3.0 and is running on Windows Server 2012 R2 Standard. What's going on here?

推荐答案

当服务的以前版本是 32 位时,我遇到了这个问题.我知道当前安装的不是(检查 CORFLAGS),但无论如何,与服务相关的进程被创建为 32 位,我一生都无法弄清楚为什么.

I had this issue when a previous version of the service had been 32 bit. I knew the currently installed one wasn't (checked CORFLAGS), but the process associated with the service was being created as 32 bit anyway, and for the life of me I couldn't work out why.

重启后问题就消失了.我想知道服务控制管理器是否记住"了每个服务的位数,作为启动优化(或其他).

After a reboot the problem went away. I wonder if the Service Control Manager 'remembers' the bitness for each service, as a startup optimization (or something).

更多推荐

为什么我的 64 位服务以 32 位运行?

本文发布于:2023-11-04 17:19:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1558547.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!