CD Compression in XBAP

I have an XBAP that should be able to burn CDs. When started from within Visual Studio, everything works fine. However, when launched from a browser, the IMAPI DLL reports that the environment is not supported as soon as it tries to access the disk.

I guess it comes down to resolution. I have a signed certificate that I installed, and xbap is configured to run as a full trust application (although I assume this cannot be, or I will not have this problem).

Currently, all this is being done on my local computer, however in the end I want it to be deployed to a web server (all users have already installed the certificate on their clients).

Does anyone have any ideas as to what I missed / did wrong?

Update:

I tried to create a new test certificate, which I installed in my certificate store, and then signed XBAP against it, but that doesn't make any difference.

Actually there may be some ideas if anyone has it?

Further update:

I created a console application that can burn CDs. Deploying this console application allows me to write cd from my xbap, but not from inside xbap itself.

However, this is really not what I want. Ideally, I want all this to be contained in xbap. Otherwise, is there a way to include a console application in xbap deployment with one click?

thanks

+6
c # xbap imapi
source share
2 answers

I find this impossible to do with XBAP. According to MS XBAP documentation ,

Examples of permissions are not available in the Internet zone:

  • FileIOPermission . This permission controls the ability to read and write files to disk. Therefore, applications in the Internet zone cannot read files on the user's hard drive.

  • RegistryPermission . This permission controls the ability to read / write to the registry. Therefore, applications in the Internet zone cannot access or manage state in the user registry.

  • SecurityPermission.UnmanagedCode . This permission controls the ability to call Win32 native functions.

When you launch XBAP over the Internet, you will encounter problem # 3: try to integrate with unmanaged code.

I would recommend deploying the application as a standalone application using ClickOnce. Thus, you can have full access to the system, but still get easy deployment and updates, as in XBAP.


* change *

One thing you could try - and I can’t guarantee that it will work, but you can force your users to switch to IE Internet Options, add your site to the list of trusted sites. I am sure that your CD burning code will work because it will be in the trusted zone, not in the Internet zone.

+2
source share

Try go

HKLM \ SOFTWARE \ Microsoft.NETFramework \ Windows Presentation Foundation \ Hosting

in the registry

create a new DWORD named RunUnrestricted with a value of 1.

0
source share

All Articles