Accepting self signed Certificates? (Windows Universal App)

0

How do I enable the Webview control to accept self signed certificate for a Windows Universal App? I am migrating an existing app from Windows 8.1 to Windows Universal. During this process I am unable to include the self signed certificate as part of the deployment package anymore. I have attempted the following steps:

  1. Copied the mycert.cer file to the Solutions Explorer.
  2. Verified that MyDocuments->Visual Studio 2015->MyApp contains the mycert.cer file.
  3. Appended the following code snipped into the package.appxmanifest file
Extensions
  Extension Category="windows.Certificates"
    Certificates
        Certificate StoreName="Root" Content="mycert.cer"
    Certificates
  Extension
Extensions

The problem is that no matter how I add mycert.cer to my project I cant seem to get past the deployment phase. I continuously receive the following error:

Error Error : DEP0700 : Registration of the app failed. C:Path to my project: error 0x80070002: Cannot register bc88a047-f619-4de8-8903-45c6c485ae92_1.0.0.0_neutral__v48a8278bjx14 package because the following error was encountered while trying to open and evaluate the mycert.cer certificate to add to the Root store: The system cannot find the file specified. (0x80073cf6) MyAppName

What am I doing wrong here? Any pointers would be appreciated.

webview
certificate
self-signed
win-universal-app
asked on Stack Overflow Jul 1, 2015 by xMythicx • edited Jul 1, 2015 by xMythicx

1 Answer

0

Shortly after I asked the question I stumbled upon the following post https://stackoverflow.com/a/18843580/680778. If you are experiencing this issue please ensure that for the build action in the Solution Explorer you have selected Content for the mycert.cer file. The above post saved me a headache. When a newly added file is added to a project the default Build Action is set to none thus, the file will not be copied to the build location.

answered on Stack Overflow Jul 1, 2015 by xMythicx • edited May 23, 2017 by Community

User contributions licensed under CC BY-SA 3.0