У меня есть приложение winform для чтения значений из реестра.
, поэтому я знаю, что для этого мне нужно работать от имени администратора.
У меня есть два сервера win 2003Один 32-разрядный, а другой 64-разрядный.
Когда я запускаю это приложение на своем 32-разрядном, у меня нет проблем, и он считывает значения из реестра ..
, но когда яЗапустите приложение с моего 64-разрядного сервера, оно не может прочитать из реестра.
Я получаю
system.nullreferenceexception
, так как я не могу прочитатькорень моего ключа 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>
это не полный манифест, поскольку есть те, которые, я думаю, не требуется показывать здесь ...