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

查看:190
本文介绍了为什么我的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天全站免登陆