That worked fine and the post was helpful (I know this from post's talk-backs).
I described how to generate security certificate and how to install it on client machine (thru IE options).
Recently, I worked with XBAP deployment files and required to copy them to new IIS server, during the process I've forgotten to include certificate (ext: "cer") file. I tried to open the application from client machine (in IE or Firefox) and got error message, that tells about security restrictions and that client has refused XBAP application in full-trust mode.
I know another way to generate certificate file without using MS Visual Studio and I'll show it here.
What are "deployment files"? – XBAP application BUILD generates assemblies and other resources that required running XBAP application. These files can be placed on IIS virtual folder and being downloaded to remote client machine by using supported Internet browser (IE or Firefox).
To see which files will be included in deployment folder go to "Publish" tab in project settings form and click on "Application Files":
To see options for deployment and how the setup page will look go to "Publish" tab in project settings form and click on "Options":
Check option: "Use '.deploy' file extension". – This is helpful for full-trust mode (some machines don't allow downloading assembly files like EXE and DLL):
If you want to include some additional files for application deployment, go to "Publish" tab in project settings form and click on "Prerequisites":
"Prerequisites" – setup-package files like .Net 2.*-3.* or Windows-Installer 3.*:
To generate deployment files and to publish them in selected folder click "Publish Now" in "Publish" tab in project settings form and click on "Prerequisites":
"Publish Now" generates these files:
"index.htm" is a deployment page, which was build with two options to run XBAP (Click-Once) application. "Run" option opens setup dialog (in case that application runs at first time or deployed with as new version), "launch" opens XBAP directly (without the installation process):
Usually I copy certificate file into this directory and place a link for download on "index.htm", but what can I do if I've forgotten to create the certificate file and already copied deployment files to client's IIS server and I don't have MS Visual Studio to create the new one from sources or event don’t have any sources (project code source files)? Answer: I can extract certificate into file from deployment executables. I can extract it from "setup.exe" file or from original "EXE" or "DLL" file if it wasn’t converted into other unknown file type.
I'll show ho to extract certificate from "setup.exe" (this file includes the same certificate as XBAP-Application EXE files).
1. Go to deployment folder and do right-click on "setup.exe" file:
2. Open "Properties" form and go to "Digital Signatures" tab page, select included digital signature and click on "Details":
3. Click "View Certificate" in "General" tab page:
4. Click on "Copy to File" in "Details" tab page:
5. Proceed with opened "Certificate Export Wizard":
(5.3) you can place extracted "cer" file in deployment folder for future use:
When you'll finish with wizard you'll get "cer" file:
(I'm "cooking" some light application that will help to install certificates automatically on user machines, when I'll finish it, I'll write the post with all sources)
Hope this post was helpful 😉