How to config ClickOnce in my application?

365 timviec 45 Reputation points
2023-03-25T08:39:55.0133333+00:00

Hi,

I'm an application developer on Windows and am having trouble with the ClickOnce on some computers. My application needs to be given hard drive access to download some files, and every time the user installs it or opens it, their Windows shows a warning window.

erorr

This has had a huge impact on my clients. So I want to remove it.

I'm looking forward to a solution for the problem.

Thank you.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,553 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,090 questions
Microsoft Configuration Manager Application
Microsoft Configuration Manager Application
Microsoft Configuration Manager: An integrated solution for for managing large groups of personal computers and servers.Application: A computer program designed to carry out a specific task other than one relating to the operation of the computer itself, typically to be used by end users.
454 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Erkan Sahin 830 Reputation points
    2023-03-25T12:40:58.64+00:00

    The warning window that you are seeing is likely the result of Windows SmartScreen, a security feature that helps protect users from downloading and running malicious software.

    To remove this warning, you can try signing your ClickOnce application with a trusted code signing certificate. This will verify your identity as a trusted developer and help users to trust your application.

    Here are the steps to sign your ClickOnce application:

    1. Obtain a code signing certificate from a trusted certificate authority (CA).
    2. In Visual Studio, go to the project properties and select the "Signing" tab.
    3. Check the "Sign the ClickOnce manifests" option.
    4. Select your code signing certificate from the "Choose a strong name key file" dropdown.
    5. Click "OK" to save the changes.
    6. Rebuild your application and publish it again.

    After you have signed your application, you may need to ask your clients to trust the certificate. This can usually be done by right-clicking on the executable file and selecting "Properties", then going to the "Digital Signatures" tab and clicking "Details", followed by "View Certificate" and then "Install Certificate".

    Note that the exact steps may vary slightly depending on your version of Visual Studio and the certificate authority you use to obtain your code signing certificate.

    Please mark my answer if it was helpful :-)