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的更多相关文章

  1. WPF入门教程系列三——Application介绍(续)

    接上文WPF入门教程系列二——Application介绍,我们继续来学习Application 三.WPF应用程序的关闭 WPF应用程序的关闭只有在应用程序的 Shutdown 方法被调用时,应用程序 ...

  2. WPF入门教程系列二——Application介绍

    一.Application介绍 WPF和WinForm 很相似, WPF与WinForm一样有一个 Application对象来进行一些全局的行为和操作,并且每个 Domain (应用程序域)中仅且只 ...

  3. How to run Java main class and pass application arguments in Maven?

    原文: http://www.logicbig.com/how-to/maven/mvn-java-exec-args/ --------------------------------------- ...

  4. WPF, WPF Browser Application(XBAP) 和 Silverlight 的区别

    由图可见,XBAP与WPF的区别是“受限的”:Silverlight与XBAP的区别是,不需要.NET Framework. 上星期與以前的同事爭論著究竟使用XBAP來開發XX用戶端 (為筆者之前開發 ...

  5. WPF中的3D Wireframe

    原文:WPF中的3D Wireframe WPF不支持画三维线,但开发人员提供了ScreenSpaceLines3D 类用于实现这个功能.我已经在程序中实现并成功显示3D Wireframe,并能够进 ...

  6. WPF上Arc Lisence的有关问题

    WPF下Arc Lisence的问题代码如下: using System; using System.Collections.Generic; using System.Configuration; ...

  7. WPF基础——Application

    一.Application介绍 WPF中的Application对象用来进行一些全局的行为和操作,并且每个 Domain (应用程序域)中仅且只有一个 Application 实例存在.WPF App ...

  8. WPF入口Application

    1.WPF和 传统的WinForm 类似, WPF 同样需要一个 Application 来统领一些全局的行为和操作,并且每个 Domain (应用程序域)中只能有一个 Application 实例存 ...

  9. WPF视频教程系列笔记

    视频二:XAML基础 1.顶级元素 <Window></Window>,<Page></Page>,<Application></Ap ...

随机推荐

  1. PHP利用rand(1,100)函数产生10个1~100之间的随机数

    //echo rand(1,100); $max=0; $min=100; for($i=0;$i<=9;$i++){ $rand[$i]=rand(1,100); if($rand[$i]&g ...

  2. 画弧线DrawArc的研究-我自己 -- 直线交接圆角

    procedure TForm4.Button7Click(Sender: TObject); var pwith: Integer; //画笔的宽度 hx1, hy1: Integer; //横线第 ...

  3. Ecshop二次开发修改

    所有的错误,根据下面这个帖子修改 http://bg.artuion.com/328.html 修改错误: 第300行 原有内容: //return preg_replace("/{([^\ ...

  4. storm的acker机制

    一.简介: storm中有一个很重要的特性: 保证发出的每个tuple都会被完整处理.一个tuple被完全处理的意思是: 这个tuple以及由这个tuple所产生的所有的子tuple都被成功处理.如果 ...

  5. css3代码整理—弹性盒子篇

    父级使用弹性盒子: #fu{ display:flex; } 父级中子级的对齐方式: 1.水平对齐方式:两端对齐 #fu { display:flex; justify-content:space-b ...

  6. Python的hasattr() getattr() setattr() 函数使用方法(简介)

    hasattr(object, name)判断一个对象里面是否有name属性或者name方法,返回BOOL值,有name特性返回True, 否则返回False.需要注意的是name要用括号括起来 1 ...

  7. 解决序列化类型为“System.Reflection.RuntimeModule”的对象时检测到循环引用。

    定义一个继承JavaScriptConverter的子类 public class DataTableConverter : JavaScriptConverter { /// <summary ...

  8. Python爬虫-request的用法

    import requests if __name__ == '__main__': #基本用法 #response = requests.get("http://httpbin.org/g ...

  9. pyqt5简单登陆界面

          登陆界面姓名输入错误会弹出错误信息.正确就会弹出第二个窗体. # -*- coding:utf-8 -*- import sys from PyQt5.QtWidgets import Q ...

  10. Mybatis源码分析之参数处理

    Mybatis对参数的处理是值得推敲的,不然在使用的过程中对发生的一系列错误直接懵逼了. 以前遇到参数绑定相关的错误我就是直接给加@param注解,也稀里糊涂地解决了,但是后来遇到了一些问题推翻了我的 ...