Original address: http://hi.csdn.net/link.php? Url = http://blog.csdn.net % 2 fstarlee
After a WPF Browser Application is developed and released to a Web server, the "Security" item is usually selected on the property Option Panel of the project, click "Calculate Permissions" to calculate the security settings of the application. If the application contains some insecure network operations (such as local disk read and write operations), the calculation result is that the "this is a full trust application" radio button is selected. Of course, you can also choose this option without computation.
If the application is published to the Web server at this time and accessed in a browser on a client, the following "Trust not granted" error will occur.
This is because the Windows Security Mechanism determines that the application belongs to a untrusted site. To solve this problem, you must create a digital certificate for the application and install it on the client.
To create a digital certificate, follow these steps:
1. Select the "signing" option in the properties Panel of the project and click the "more details..." button.
2. In the pop-up "certificate" dialog box, select "details" and click "Copy to file.
3. In the displayed "Certificate export wizard" Wizard dialog box, click "Next". In the following dialog box, select "DER encoded binary X.509 (. CER.
4. Click "Next" until a digital certificate (File suffixed with. CER) is created ).
In this way, a digital certificate is created for the WPF Browser Application.
To install a digital certificate on a client, follow these steps:
1. First copy the digital certificate file to the client computer.
2. Double-click the digital certificate file (file with the extension name. CER), and click "Install certiciate..." in the pop-up "certificate" dialog box.
3. In the displayed "Certificate import wizard" dialog box, select "place all certificates in the following store" and click "Browse.
4. In the "select certificate store" dialog box that appears, select the "Trusted Root Certification Authorities" item and click "OK.
5. In the "Certificate import wizard" Wizard dialog box, click "Next" until the digital certificate installation is complete.
6. Repeat steps 2 and 3 above. In the "select certificate store" dialog box that appears, select the "trusted publishers" item and click "OK.
7. In the "Certificate import wizard" Wizard dialog box, click "Next" until the digital certificate installation is complete.
In this way, the digital certificate of the WPF Browser application is installed on the client computer.
Now, if you access the WPF Browser Application on a client computer that has installed a digital certificate, there will be no "Trust not granted" error.
The above method and steps are used to create a real "full trust" WPF Browser Application.