WPF(XBAP)应用程序在某些计算机上不受信任,但其他计算机会提示并可以运行该应用程序 [英] WPF (XBAP) application not trusted on some machines butother get a prompt and can run the application

查看:510
本文介绍了WPF(XBAP)应用程序在某些计算机上不受信任,但其他计算机会提示并可以运行该应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到WPF文件无法正常运行的问题. 在某些计算机上,它将启动并显示安全提示,然后单击确定"使应用程序正常运行. 但是在其他计算机上(某些设置相同,因为这些计算机在我们网络的这一端都具有相同的映像),没有弹出安全提示,只是在下面放置了未授予信任"日志.我已经尝试了一些方法,包括但不限于:直接将其显示到iis,文件位置并将其移到其他位置(全部使用clickOnce),我已经检查了Fullpermissions,我尝试了签名和取消注册,并使用了密码和未密码的pfx.

我无法修改受信任站点等的IE设置(但我认为这不是问题所在,因为可以运行的计算机和未运行的计算机应该具有相同的设置)

我将竭诚为您服务.谢谢.

PLATFORM VERSION INFO
    Windows             : 5.1.2600.196608 (Win32NT)
    Common Language Runtime     : 4.0.30319.239
    System.Deployment.dll       : 4.0.30319.1 (RTMRel.030319-0100)
    clr.dll             : 4.0.30319.239 (RTMGDR.030319-2300)
    dfdll.dll           : 4.0.30319.1 (RTMRel.030319-0100)
    dfshim.dll          : 4.0.31106.0 (Main.031106-0000)

SOURCES
    Deployment url          : http://***.***.***.***/AutoData/AntiRoom/TestManagement.xbap
    Application url         : http://***.***.***.***/AutoData/AntiRoom/Application%20Files/TestManagement_1_0_0_25/TestManagement.exe.manifest

IDENTITIES
    Deployment Identity     : TestManagement.xbap, Version=1.0.0.25, Culture=en, PublicKeyToken=cbf2bb8ca25cd6ff, processorArchitecture=msil
    Application Identity        : TestManagement.exe, Version=1.0.0.25, Culture=en, PublicKeyToken=cbf2bb8ca25cd6ff, processorArchitecture=msil, type=win32

APPLICATION SUMMARY
    * Online only application.
    * Browser-hosted application.

ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * An exception occurred while determining trust. Following failure messages were detected:
        + User has refused to grant required permissions to the application.
    * An exception occurred while downloading the application. Following failure messages were detected:
        + The AssertApplicationRequirements method failed. The application cannot be committed.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.

WARNINGS
    There were no warnings during this operation.

OPERATION PROGRESS STATUS
    No phase information is available.

ERROR DETAILS
    Following errors were detected during this operation.
    * [01/03/2012 10:30:58 AM] System.Deployment.Application.TrustNotGrantedException (Unknown subtype)
        - User has refused to grant required permissions to the application.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.ApplicationTrust.RequestTrust(SubscriptionState subState, Boolean isShellVisible, Boolean isUpdate, ActivationContext actCtx, TrustManagerContext tmc)
            at System.Deployment.Application.DeploymentManager.DetermineTrustCore(Boolean blocking, TrustParams tp)
            at System.Deployment.Application.DeploymentManager.DetermineTrust(TrustParams trustParams)
            at System.Deployment.Application.InPlaceHostingManager.AssertApplicationRequirements(Boolean grantApplicationTrust)
            at System.Deployment.Application.InPlaceHostingManager.AssertApplicationRequirements()
            at MS.Internal.AppModel.XappLauncherApp.AssertApplicationRequirementsAsync(Object unused)
    * [01/03/2012 10:30:58 AM] System.Deployment.Application.DeploymentException (Unknown subtype)
        - The AssertApplicationRequirements method failed. The application cannot be committed.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.DeploymentManager.WaitForAssertApplicationRequirements()
            at System.Deployment.Application.DeploymentManager.SynchronizeCore(Boolean blocking)
            at System.Deployment.Application.DeploymentManager.SynchronizeAsyncWorker()

COMPONENT STORE TRANSACTION DETAILS
    No transaction information is available.

解决方案

这是我用来使内部网络上的所有XBAP以Full Trust身份运行的脚本.通常,我将其放置在一个批处理文件中,如果用户向我发送有关完全信任错误的电子邮件,则将链接发送给.bat.

%systemroot%\Microsoft.NET\Framework\v2.0.50727\CasPol -q -machine -addgroup All_Code -url http://InternalWebServer/* FullTrust -n XBAPSecurity -polchgprompt off

只需用内部Web服务器根目录替换InternalWebServer的位置

I'm having an Issue with a WPF file not running correctly. On some machines it starts a security prompt shows up and clicking ok lets the application run fine. but on other machines (some with an identical set up because the machines are all imaged the sames on this side of our network) no security pop up, just "Trust not Granted" I've Placed a Log below. I've tried things including but not limted to, deplying it directly to iis, to a file location and moving it over,( all using clickOnce) i have Fullpermissions checked, ive tried signed and unsigend, with passworded and unpassworded pfx.

I don't have the ability to modify the IE settings for the trusted sites and the like ( but I don't think thats the problem because the machines that work and the ones that son't should have the same set up)

I'd be greatful for any help. Thanks.

PLATFORM VERSION INFO
    Windows             : 5.1.2600.196608 (Win32NT)
    Common Language Runtime     : 4.0.30319.239
    System.Deployment.dll       : 4.0.30319.1 (RTMRel.030319-0100)
    clr.dll             : 4.0.30319.239 (RTMGDR.030319-2300)
    dfdll.dll           : 4.0.30319.1 (RTMRel.030319-0100)
    dfshim.dll          : 4.0.31106.0 (Main.031106-0000)

SOURCES
    Deployment url          : http://***.***.***.***/AutoData/AntiRoom/TestManagement.xbap
    Application url         : http://***.***.***.***/AutoData/AntiRoom/Application%20Files/TestManagement_1_0_0_25/TestManagement.exe.manifest

IDENTITIES
    Deployment Identity     : TestManagement.xbap, Version=1.0.0.25, Culture=en, PublicKeyToken=cbf2bb8ca25cd6ff, processorArchitecture=msil
    Application Identity        : TestManagement.exe, Version=1.0.0.25, Culture=en, PublicKeyToken=cbf2bb8ca25cd6ff, processorArchitecture=msil, type=win32

APPLICATION SUMMARY
    * Online only application.
    * Browser-hosted application.

ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * An exception occurred while determining trust. Following failure messages were detected:
        + User has refused to grant required permissions to the application.
    * An exception occurred while downloading the application. Following failure messages were detected:
        + The AssertApplicationRequirements method failed. The application cannot be committed.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
    No transaction error was detected.

WARNINGS
    There were no warnings during this operation.

OPERATION PROGRESS STATUS
    No phase information is available.

ERROR DETAILS
    Following errors were detected during this operation.
    * [01/03/2012 10:30:58 AM] System.Deployment.Application.TrustNotGrantedException (Unknown subtype)
        - User has refused to grant required permissions to the application.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.ApplicationTrust.RequestTrust(SubscriptionState subState, Boolean isShellVisible, Boolean isUpdate, ActivationContext actCtx, TrustManagerContext tmc)
            at System.Deployment.Application.DeploymentManager.DetermineTrustCore(Boolean blocking, TrustParams tp)
            at System.Deployment.Application.DeploymentManager.DetermineTrust(TrustParams trustParams)
            at System.Deployment.Application.InPlaceHostingManager.AssertApplicationRequirements(Boolean grantApplicationTrust)
            at System.Deployment.Application.InPlaceHostingManager.AssertApplicationRequirements()
            at MS.Internal.AppModel.XappLauncherApp.AssertApplicationRequirementsAsync(Object unused)
    * [01/03/2012 10:30:58 AM] System.Deployment.Application.DeploymentException (Unknown subtype)
        - The AssertApplicationRequirements method failed. The application cannot be committed.
        - Source: System.Deployment
        - Stack trace:
            at System.Deployment.Application.DeploymentManager.WaitForAssertApplicationRequirements()
            at System.Deployment.Application.DeploymentManager.SynchronizeCore(Boolean blocking)
            at System.Deployment.Application.DeploymentManager.SynchronizeAsyncWorker()

COMPONENT STORE TRANSACTION DETAILS
    No transaction information is available.

解决方案

Here's the script I use to make all XBAPs on our internal network run as Full Trust. Usually I place this in a batch file and send users the link to the .bat if they email me about Full Trust errors

%systemroot%\Microsoft.NET\Framework\v2.0.50727\CasPol -q -machine -addgroup All_Code -url http://InternalWebServer/* FullTrust -n XBAPSecurity -polchgprompt off

Just replace where it says InternalWebServer with whatever your internal web server root is

这篇关于WPF(XBAP)应用程序在某些计算机上不受信任,但其他计算机会提示并可以运行该应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆