How to run WPF – XBAP as Full Trust Application
Recently I work on WPF-XBAP application that will run from intranet website:
![]()
This application must have unrestricted access to client's OS resources (that is unusual for XBAP projects):
![]()
I publish it on local website by using "Click-Once" deployment mechanism:
![]()
User can launch the application from deployment page (also can run application setup):
![]()
I get security error ("User has refused to grant required permissions to the application"):
![]()
Means that application tried to perform some restricted action, beyond of XBAP sandbox. Actually it tried to read local video file:
![]()
(It reads video file from local source, for preview option before uploading it to FTP server)
After some research I found how to fix that:
(1) Project must be signed with "Click-Once" manifest (security certificate file):
![]()
(If project doesn't contain "Test Certificate" click on rounded button to create a new one)
(2) After temporary certificate was created we'll save it into file (click on "More Details"):
![]()
File export wizard (step A):
![]()
File export wizard (step B):
![]()
File export wizard (step C):
(Enter username and password, only if you did so while "Test Certificate" creation in par. 1)
![]()
File export wizard (step D):
![]()
File export wizard (step E):
![]()
File export wizard (step F):
![]()
(Now project certificate is saved as external file)
(3) Now we'll go to Internet Explorer and will register this certificate:
(Open "Internet Options" from "Tools" menu)
![]()
Click on "Certificates" in "Content" tab:
![]()
Import certificate file from "Trusted Root Certification Authorities" tab:
![]()
File import wizard (step A):
![]()
File import wizard (step B):
![]()
File import wizard (step C):
![]()
File import wizard (step D):
![]()
Confirm importing:
![]()
If succeed you'll get this window:
![]()
And will see certificate here:
![]()
Do same in "Trusted Publishers" tab:
![]()
Close IE options:
![]()
(6) No we'll go to "Signing" tab in project options and will select registered certificate:
![]()
Select registered certificate from local store:
![]()
(5) Republish the application:
![]()
![]()
Now XBAP can run in "Full Trusted" mode:
![]()
Hope this post was helpful ![]()
from:http://blogs.microsoft.co.il/maxim/2008/03/05/how-to-run-wpf-xbap-as-full-trust-application/
How to run WPF – XBAP as Full Trust Application的更多相关文章
- WPF入门教程系列三——Application介绍(续)
接上文WPF入门教程系列二——Application介绍,我们继续来学习Application 三.WPF应用程序的关闭 WPF应用程序的关闭只有在应用程序的 Shutdown 方法被调用时,应用程序 ...
- WPF入门教程系列二——Application介绍
一.Application介绍 WPF和WinForm 很相似, WPF与WinForm一样有一个 Application对象来进行一些全局的行为和操作,并且每个 Domain (应用程序域)中仅且只 ...
- How to run Java main class and pass application arguments in Maven?
原文: http://www.logicbig.com/how-to/maven/mvn-java-exec-args/ --------------------------------------- ...
- WPF, WPF Browser Application(XBAP) 和 Silverlight 的区别
由图可见,XBAP与WPF的区别是“受限的”:Silverlight与XBAP的区别是,不需要.NET Framework. 上星期與以前的同事爭論著究竟使用XBAP來開發XX用戶端 (為筆者之前開發 ...
- WPF中的3D Wireframe
原文:WPF中的3D Wireframe WPF不支持画三维线,但开发人员提供了ScreenSpaceLines3D 类用于实现这个功能.我已经在程序中实现并成功显示3D Wireframe,并能够进 ...
- WPF上Arc Lisence的有关问题
WPF下Arc Lisence的问题代码如下: using System; using System.Collections.Generic; using System.Configuration; ...
- WPF基础——Application
一.Application介绍 WPF中的Application对象用来进行一些全局的行为和操作,并且每个 Domain (应用程序域)中仅且只有一个 Application 实例存在.WPF App ...
- WPF入口Application
1.WPF和 传统的WinForm 类似, WPF 同样需要一个 Application 来统领一些全局的行为和操作,并且每个 Domain (应用程序域)中只能有一个 Application 实例存 ...
- WPF视频教程系列笔记
视频二:XAML基础 1.顶级元素 <Window></Window>,<Page></Page>,<Application></Ap ...
随机推荐
- Metro应用Json数据处理
Windows Phone 8 或者 Windows 8 平台对JSON数据的处理方式基本是一致的,需要使用DataContractJsonSerializer类将对象的实例序列化为JSON字符串,并 ...
- php 面试指南
https://xianyunyh.gitbooks.io/php-interview/
- leetcode 之Remove Duplicates from Sorted Array(2)
描述 Follow up for ”Remove Duplicates”: What if duplicates are allowed at most twice? For exampl ...
- HDU 2112 Today(Dijkstra+map)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2112 题目大意: 经过锦囊相助,海东集团终于度过了危机,从此,HDU的发展就一直顺风顺水,到了2050 ...
- Expert C Programming 阅读笔记(~CH1)
P4: 好梗!There is one other convention—sometimes we repeat a key point to emphasize it. In addition, w ...
- linq to sql: 在Entityfamework Core中使用多个DbContext
最近在学习DotNetCore并做一个自己的小项目,分为了多个数据库,AccountDbContext和BlogDbContext, 发blog的时候需要用到Account的信息,但是再Blog中只记 ...
- 在microsoft/dotnet:2.0.0-sdk中安装vim编辑器
在Docker中安装了dotnetcore 2.0.0 的sdk,没有发现可用的编辑器,该sdk是基于debian:stretch构建的,以前没玩过debian,因为CentOS玩的多一些所以对vim ...
- yum使用
一.使用yum安装和卸载软件,有个前提是yum安装的软件包都是rpm格式的.安装的命令是,yum install ~,yum会查询数据库,有无这一软件包,如果有,则检查其依赖冲突关系,如果没有依赖冲突 ...
- shell grep 筛选
egrep '^.{11}(WP)' inputfile | sort -k1.17,1.24 > outputfile WP 在12位开始.
- Oracle意外赢官司,程序员或过苦日子
关于“Google在Android平台使用Java侵犯知识产权”一案,2014年5月,联邦法院判定Oracle获胜,这个结果完全出人意料,因为这样一来无异于打开了软件开发领域中API使用方式的潘多拉之 ...