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 ...
随机推荐
- Windows Phone 8/Windows 8 启动第三方应用程序并传递参数
需要被其他应用启动的第三方应用需要注册protocol association,当一个应用程序启动一个特殊的URI的时候,那么注册了这个protocol的程序会自动启动,并且可以通过这个特殊的URI将 ...
- Codeforces 822D My pretty girl Noora(最小素因子的性质)
题目大意:一场选美比赛有N个人,可以分成N/x,每组x人.每组的比较次数为x(x-1)/2,f[N]为最后决出冠军所需的比较次数,可以通过改变x的值使f[N]改变.题目给出t,l,r(1 ≤ t &l ...
- (四)Spring 对DAO 的支持
第一节:Spring 对JDBC 的支持 1,配置数据源dbcp: 2,使用JdbcTemplate: 3,JdbcDaoSupport 的使用: 4,NamedParameterJdbcTempla ...
- flask-login 学习(1)
今天的目标,就是学习 flask-login.争取用1天时间,掌握个大概. 第一步:掌握flask-login的大致使用,具体参考了:https://www.centos.bz/2017/09/fla ...
- C++ 静多态与动多态
多态是指通过单一的标识支持不同的特定行为的能力. C++中有两种多态,称为动多态(运行期多态)和静多态(编译期多态),而静多态主要通过模板来实现,宏也是实现静多态的一种途径. 动多态在C++中是通过虚 ...
- 常用开放api【长期更新】
获取时间: 苏宁:http://quan.suning.com/getSysTime.do 淘宝:http://api.m.taobao.com/rest/api3.do?api=mtop.commo ...
- 微信开发(一)SAE环境搭建
登录新浪sae平台,点击sae 点击创建新应用->继续创建 环境选择: 填好后点击创建应用 点击创建版本 点击链接可以访问,点击编辑代码可以在线编辑,代码上传可以是svn,git,可以在线上传 ...
- EOJ 3256 拼音魔法
模拟. 有$a$先标$a$,其次是$o$和$e$,$o$和$e$在韵母中不会同时存在.最后是$u$和$i$,这两个字母在韵母中可能同时存在,标在后面的那个.输出那些字符的话直接输出就可以了. 举几个例 ...
- 【面试总结-编程】多行两列数据,实现同key的value求和并输出
一个文件,两列,多行. 第一列是字母,第二列是数字,同列数据之间通过空格分割. 统计首列字母相同的第二列之和. 样例输入: A 5 B 6 OO 7 A 6 A 2 OO 2 输出: A:13 B:6 ...
- Bzoj2002/洛谷P3203 [HNOI2010]弹飞绵羊(分块)
题面 Bzoj 洛谷 题解 大力分块,分块大小\(\sqrt n\),对于每一个元素记一下跳多少次能跳到下一个块,以及跳到下一个块的哪个位置,修改的时候时候只需要更新元素所在的那一块即可,然后询问也是 ...