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

编程入门 行业动态 更新时间:2024-10-28 16:22:10
本文介绍了为什么我的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:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1558548.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:

发布评论

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

>www.elefans.com

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