Winforms Winform应用程序未在64位服务器上运行
我有一个winform应用程序从注册表项读取值 所以我知道我必须以管理员的身份运行才能这样做 我有两台WIN2003服务器。一个是32位,另一个是64位 当我在32位上运行这个应用程序时,我没有问题,它从注册表读取值 但是,当我从64位服务器运行应用程序时,它无法从注册表读取数据 我得到一份工作 system.nullreferenceexception 因为我无法读取返回null的reg密钥的根 我也放了一个清单文件,但它也不起作用 任何帮助都将不胜感激。。。谢谢 这是我的清单文件:Winforms Winform应用程序未在64位服务器上运行,winforms,registry,manifest,uac,windows64,Winforms,Registry,Manifest,Uac,Windows64,我有一个winform应用程序从注册表项读取值 所以我知道我必须以管理员的身份运行才能这样做 我有两台WIN2003服务器。一个是32位,另一个是64位 当我在32位上运行这个应用程序时,我没有问题,它从注册表读取值 但是,当我从64位服务器运行应用程序时,它无法从注册表读取数据 我得到一份工作 system.nullreferenceexception 因为我无法读取返回null的reg密钥的根 我也放了一个清单文件,但它也不起作用 任何帮助都将不胜感激。。。谢谢 这是我的清单文件: <
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1">
<asmv1:assemblyIdentity version="1.0.0.31" name="FileShareMgmt.exe" publicKeyToken="0000000000000000" language="neutral" processorArchitecture="msil" type="win32" />
<application />
<entryPoint>
<assemblyIdentity name="FileShareMgmt" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<commandLine file="FileShareMgmt.exe" parameters="" />
</entryPoint>
<trustInfo>
<security>
<applicationRequestMinimum>
<PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" />
<defaultAssemblyRequest permissionSetReference="Custom" />
</applicationRequestMinimum>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
If you want to utilize File and Registry Virtualization for backward
compatibility then delete the requestedExecutionLevel node.
-->
</requestedPrivileges>
</security>
</trustInfo>
这不是完整的清单,因为我认为这里不需要显示这些清单…您是否已验证您试图读取的密钥是否存在于64位系统上 对于64位系统,路径可能不同: 如果注册表项包含文本“WOW6432node”,则为32位版本。64位版本可能是相同的,只是路径的一部分不存在
这个问题可能与此相关:我们可能需要查看源代码才能解决这个问题。谢谢。。。问题是在构建过程中,我不得不使用x86。。这让我想知道为什么我需要清单来“requestedExecutionLevel=”highestAvailable“”