Move ClickOnce repository without reinstall in client machines. Is it possible? - deployment

I have a C# application (WinForms) (ClickOnce) whose repository is installed on a server that is about to crash, so my boss asked me to move the repository, but there are around 300 client machines which have the application installed.
The ClickOnce is signed with a Test Certificate.
Is it possible to move the repository without having to reinstall in the client machines?
Thanks in Advance
[EDIT]
I Have published the application to the new server, but the clients don't reach it, what else can I do? I think i should change something inside the manifest or something like that, but a actually don't know too much about ClickOnce... In any case, i would like to avoid the reinstallation on all the client machines, any ideas, suggestion? thanks in advance

The answer provided by Jhonny seemed promising to me, and I encountered an error when I tried it, which I had to solve. It had to do with certificates.
After following his setps, when I launch the ClickOnce app on the client machine, I get an error dialog: "Cannot Start Application".
When I click on the Details... button in the error dialog, the text file that opens shows that the app is trying to update from the Deployment Provider URL of the new server, but it gives this error:
"The deployment identity does not match the subscription."
The problem was the certificate used to publish the app on the old server was expired, and I had updated the certificate in the app published on the new server. The certificates didn't match.
The solution was to first publish the app to the old server with the new certificate, have the users open the app to get that update, then publish another new version with the Deployment URL of the new server, and copy the files to both servers. When the users updated the next time, they got the version of the app from the old server with the manifest pointing to the new server, and then, all subsequents updates were retrieved from the new server.

Here is what I have done, for people who may have the same issue.
Setup the new server on the publish package. (Project Properties, Publish Tab)
Publish to the new server
Copy the published files to the old server. (Include the .application file and the folder)
When the clients reach the old server, they will update, but the server location will be updated on the client to the new server name.

You could try to change the DNS alias so that it redirects to your new server.
The fact that the code signed using a certificate is not relevant, since code-signing certificates are not bound to a specific repository (as opposed to SSL certificates)
Btw, why don't you want to reinstall? The whole point of clickonce is to ease this kind of software update !!

Related

Reusing SSL Certificate

My team is building a web application for our capstone project. We deployed it to digitalocean using dokku, everything was fine but one of us(aka me) accidentally deleted the database. Since my team and I don't know anything about deployment, we ended up hitting our rate limit on letsencrypt for the certificates trying to redeploy. Reading through there documentation it says we have to wait a week before being able to get another certificate. I was wondering if it was possible to find the certificates that was issued and applying to the domain? Or if there is another solution? Thank you.

Failed to find a valid digest in the 'integrity' attribute for resource?

I have just created a hosted blazor webassembly pwa project, which generates client, server and shared projects, all fine. I start the solution and everything runs fine.
But after I start to add small changes to the projects it stops working with a message like this:
"Failed to find a valid digest in the 'integrity' attribute for resource '' with computed SHA-256 integrity '47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='. The resource has been blocked."
I search the net and stack overflow and find others having almost the same problem. Some can do clean and rebuild to solve this, but that's not working for me.
So, what is this? Why is this happening, totally useless?
Is it the PWA feature? Should I create a new solution without the pwa enabled?
It started happening to me recently. Only on a published released solution. Not on local debug.
Clean+rebuild didn't work for me. I had to delete bin and obj folders from both Client and Server (note: tried client only and, it did not work but, did not try server only) then republish.
cf. Failed to find a valid digest in the 'integrity' attribute for resource in Blazor app
It now occurs each time I upgrade or downgrade a package.
I've done several tests and can confirm :
DLL are the right ones (SHA256 hash validated) on the server.
the string in the blazor.publish.boot.json is the right ones.
I was even able to get rid of the problem by reverting to the previous package version prior to the bug (which changes back the related entry in blazor.publish.boot.json). Which for me confirms a reference is not updated somewhere.
The only significant changes I've made recently are switching to VS2022 and .NET6. The bug appeared after I did my first successful publish on Azure through VS2022: 1st package upgrade after that triggered the bug.

How to share a self-signed clickonce certificate with different clients for development

I am developing a clickonce C sharp project in Visual Studio.
On my main computer, I have generated a self-signed certificate for the clickonce manifest.
This works fine, I can compile, deploy and run.
I also sync this solution to my github account, and regularly pull updates down to a backup computer.
The backup computer is not able to simply compile this solution, as it gives errors in regards to self-signed keys.
I could generate a new one on the backup computer, but then when I deploy to same testbed, it causes issues because the certificate is from a different location.
I want to quickly be able to deploy from the backup computer in the event that there is an issue with the main.
How can I share the main computer's generated certificate with my backup environment without issue?
My apologies if this is straightforward or I am missing something obvious.
Run certmgr.msc (user) or certlm.msc (computer) and look in My Certificates for the certificate. Right click it an check if you can export it with the private key resulting in am PFX file (PKCS#12).
If this is not possible generate a new one with the -ExportPolicy Exportable option.

Changes in Windows Azure web role via remote desktop are not propagating

I have deployed a web role on Windows Azure. It runs on one instance only. I set up the remote desktop to access it.
At the moment I need to change only two lines in a JavaScript file in the website.
I connected to the instance then ...
navigated to the E:\approot\Scripts
opened the target file, edited it
Changes didn't propagate. (I download the old content)
Then I tried to
Stop the IIS in web role
Edit the file
Start the IIS again
Changes didn't propagate (When I open the file in the RD I see my new content, but when open via http I see the old content)
Then I tried
Opened RD
Navigated to the file and edited it
Rebooted the instance via Windows Azure control panel
Again connected to RD
I still see the old content in the remote server
My question is what I should do in order to change only one file without redeploying the whole package?
My guess is you're editing the wrong location. Look in e:\sitesroot\0 (or something like that). When in doubt, open the IIS config UI and find out exactly where the website content lives.
EDIT: But as Dennis pointed out, changes you make this way don't persist, so use this only for testing.
I have had this work before, but there problems with this type of change. If something happened to the hardware you are running on and your instance needed to be 'healed', it will only be created from the package you uploaded. Azure does not know about the file edits you have made via RD.
There is not a way to make a single file change in side of a cloud service right now, but with the new Azure web site functionality it is just a git push or tfs push away.
You should be able to do a web deploy by right clicking on your website project (not the azure role project). This will only deploy files which have changed to the active instance. I believe there is a setting in your azure deployment profile (next to the remote desktop one) to enable this.
As noted in other answers these changes are lost should azure need to recreate or provision additional instances. Still, it is a great way to make incremental changes for development.

Click once deployment to a ISP hosted Server (ISP is Lunarpages in this case)

I know this has some crossover to Serverfault.com but the advice on meta.stackoverflow was to ask it here (first) as it requires a .NET dev to answer more than likely.
I am having some problems publishing to my website a Click Once App, I am getting an error message saying (something like) IIS not running, I'm not currently at home to give an exact error message, i'll edit later if it is required to answer this question.
My ISP is lunarpages the plan I am on is this one IIS is definitely running as I have BlogEngine.NET running just fine. Anyone know what is required configuration wise (both server and client) to make this work?
The files that the ClickOnce publish create can be run on just about any web environment (include Apache/Linux.) It simply generates an html page along with the application manifest and your application files. Maybe you can deploy to a local folder and upload the files to the server?