Today I make a test of a certain WPF application run in both Win-Form and web browser, for complex application it does exist some limitation with run in web browser.
WPF Browser Application also call as XBAP, in XBAP it can’t do below operation:
- New window or dialog;
- XAML serialize;
- Show SaveFileDialog;
- Access local file system;
- Access registry;
- Windows communication foundation service;
- Bitmap effects
But via modify browser’s security setting it can run correctly.
Application publish should follow these steps:
1. Use a Key.pfx file sign XBAP.
2. Use a key.pfx sign referenced assemblies;
3. In XBAP project’s Security setting page, check “This is a full trust application”
Microsoft Internet explorer setting:
1. In Certificates page import the Key.pfx file to “Trusted Root Certification Authorities” and “Trusted Publishers” .
Thus we access the XBAP.
Below is the application run in Win-Form
Below is the application run in web browser.