Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/266.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 清单中的requestedExecutionLevel在windows server 2003上无法正常工作_C#_Manifest_Windows Server 2003_Uac - Fatal编程技术网

C# 清单中的requestedExecutionLevel在windows server 2003上无法正常工作

C# 清单中的requestedExecutionLevel在windows server 2003上无法正常工作,c#,manifest,windows-server-2003,uac,C#,Manifest,Windows Server 2003,Uac,我在WindowsServer2003上运行我的C#应用程序时遇到问题。我有以下行的内部清单文件 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> <security> <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3"> <requestedExecutionLevel level="r

我在WindowsServer2003上运行我的C#应用程序时遇到问题。我有以下行的内部清单文件

  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
      </requestedPrivileges>
    </security>
  </trustInfo>


它在Windows7或Windows8上运行良好,当用户试图在没有管理员权限的情况下运行应用程序时,会提示UAC。但在windows server 2003上,用户可以在没有管理员权限的情况下启动它,UAC不会被提示,因此应用程序无法正常工作。

UAC根本不存在于windows server 2003中,它仅在windows Vista和windows server 2008中引入

您的应用程序必须接受可以在没有管理权限的情况下启动。因此,它必须执行自己的管理权限检查,如果发现它正在由管理员以外的其他人运行,它应该告诉用户,然后退出