为什么我的 64 位服务以 32 位运行? [英] Why is my 64 bit service running as 32 bit?

查看:30
本文介绍了为什么我的 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 位运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆