I have having an Trust issue in publishing the xbap in Test Environment. How to resolve the issue.

Suraj Kiran 25 Reputation points
2025-07-22T13:06:18.1533333+00:00

I have having an Trust issue in publishing the xbap in Test Environment. How to resolve the issue.

Which certificate is require for trusting the application to host the xbap application.

Developer technologies | Windows Presentation Foundation
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Varsha Dundigalla(INFOSYS LIMITED) 795 Reputation points Microsoft External Staff
    2025-07-29T09:30:19.0733333+00:00

    Thank you for reaching out.
    Here’s steps to fix trust issues when publishing an XBAP application in a test environment:

    Step 1: Create a Self-Signed Certificate

    Open PowerShell as Administrator and run:

    
    New-SelfSignedCertificate -Type CodeSigningCert -Subject "CN=TestXBAPCert" -CertStoreLocation "Cert:\LocalMachine\My"
    

    Then export the certificate:

    1. Run certlm.msc
    2. Go to Personal > Certificates
    3. Find TestXBAPCert
    4. Right-click → All Tasks → Export
    5. Choose Yes, export the private key
    6. Save as TestCert.pfx with a password

    Step 2: Sign Your XBAP Project in Visual Studio

    1. Right-click your XBAP project → Properties
    2. Go to the Signing tab
    3. Check Sign the ClickOnce manifests
    4. Browse and select TestCert.pfx
    5. Enter the password
    6. Publish the project

    Step 3: Trust the Certificate on Test Machines

    1. Copy TestCert.pfx to the test machine
    2. Double-click the file to start the import wizard
    3. Choose Local Machine
    4. Import into:
      • Trusted Root Certification Authorities
      • Trusted Publishers
      1. Complete the wizard and accept any warnings

    Once done, your XBAP will be signed and trusted, and it will run with full trust in the test environment without security warnings.

    Let me know if you want any further help with these steps.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.