I have an XBAP that needs to be able to burn cd's. When running from inside Visual Studio, everything works okay. However when running from a browser, the IMAPI dll reports that the environment is not supported as soon as it tries to access the drive.
I am assuming this is coming down to permissioning. I have a signed certificate which I have installed and the xbap is set to run as a full trust application (although I'm guessing that it can't be or I wouldn't be having this problem).
Currently this is all running on my local machine, however eventually I want this to be deployed to a web server (all users will already have the certificate installed on their clients).
Does anyone have any ideas as to what I've missed/done wrong?
Update:
我已经尝试创建一个新的测试证书,我已经在我的证书库中安装了该证书,然后针对它签署了XBAP,但它没有任何区别.
如果有人有任何想法,真的可以做到吗?
进一步更新:
我创建了一个能够刻录cd的控制台应用程序.对这个控制台应用程序的控制允许我从我的xbap中刻录cd,但不能从xbap本身内部刻录.
但是,这真的不是我想要的.理想情况下,我希望将所有这些包含在xbap中.如果失败了,有没有办法在xbap的单击部署中包含控制台应用程序?
谢谢
我相信这对于 XBAP 来说是不可能的。根据XBAP 的 MS 文档,
Internet 区域中不可用的权限示例:
FileIOPermission - 此权限控制在磁盘上读取和写入文件的能力。因此,Internet 区域中的应用程序无法读取用户硬盘上的文件。
注册表权限- 此权限控制读/写注册表的能力。因此,Internet 区域中的应用程序无法访问或控制用户注册表中的状态。
SecurityPermission.UnmanagedCode - 此权限控制调用本机 Win32 函数的能力。
当您通过 Internet 运行 XBAP 时,您将遇到问题 #3:尝试与非托管代码进行互操作。
我建议使用 ClickOnce 将您的应用程序部署为独立应用程序。这样,您就可以完全访问系统,但仍然可以像使用 XBAP 一样轻松部署和升级。
*编辑*
您可以尝试一件事 - 我不能保证它会起作用 - 但您可以让您的用户进入 IE Internet 选项,将您的网站添加到受信任的网站列表中。我敢打赌,您的 CD 刻录代码将会起作用,因为它将位于受信任区域,而不是 Internet 区域。
| 归档时间: |
|
| 查看次数: |
256 次 |
| 最近记录: |