Publish the hosted site and Windows companion
CoHo Appz World Backup — Backup and restore tool for Minecraft worlds.
Not an official Minecraft product. Not approved by or associated with Mojang or Microsoft.
Publisher: CoHo Appz (configurable). Set the publisher's real contact information as described below.
Build and package
From the extracted solution folder on Windows, run:
.\scripts\Publish.ps1 -PublisherName 'CoHo Appz' -SupportEmail 'YOUR_REAL_SUPPORT_EMAIL'
Replace YOUR_REAL_SUPPORT_EMAIL with an address that reaches you. Alternatively supply -ContactUrl 'YOUR_REAL_HTTPS_CONTACT_PAGE'; replace that token with a working HTTPS contact page. Both options may be supplied. A chat or forum link is insufficient. No actual support contact was supplied for the source package, so the script intentionally stops if both options are omitted. Confirm CoHo Appz is the correct publisher; otherwise change -PublisherName.
The script runs build and automated checks, publishes artifacts/web, and creates artifacts/CoHo-Appz-World-Backup-Companion-win-x64.zip. It stamps your publisher/contact settings into both outputs and writes PRODUCT-NOTICE.md to each. The companion README also includes the contact information and non-affiliation notice. The companion is self-contained for Windows x64; users do not need to install the .NET runtime. It is larger than a framework-dependent EXE because it includes the runtime.
The script verifies the companion ZIP contains the EXE, installer, icon, publisher settings, guide, notice, and license. It copies the same ZIP into artifacts/web/App_Data/Downloads/ and verifies the copy's SHA-256 hash. Uploading the complete website output makes the home page's Download Windows companion button available. The source ZIP itself contains source code; the actual Windows download is produced by this script on your Windows development PC.
Do not distribute the source ZIP as an installed companion. Distribute the generated companion ZIP after validation. The installer runs per Windows user and does not need administrator rights.
SmarterASP.NET
Use a dedicated HTTPS site or subdomain at its root, such as https://worldbackup.example.com/. This version is not configured for an IIS sub-application at /mcs/.
The web project now sets AspNetCoreHostingModel to OutOfProcess. Visual Studio and command-line publishing use that setting when generating web.config. Before uploading, confirm hostingModel="outofprocess" is on the <aspNetCore> element and stdoutLogEnabled="false" for normal operation. Check that a publish profile or custom source web.config does not override these values. See IIS hosting and startup diagnostics for the complete configuration and recovery steps.
- Configure your hosting site for ASP.NET Core and a matching .NET 8 runtime (or .NET 10 after retargeting).
- Enable HTTPS with a valid certificate. The companion refuses plain HTTP and does not bypass certificate validation.
- Upload the contents of
artifacts/webto the site's root, including generatedweb.config, the assemblies,wwwroot, and **App_Data/Downloads**. Keep the generated companion ZIP in that folder. - Alternatively, configure the publisher/contact settings below, then right-click
Mcs.Webin Visual Studio, choose Publish, and import the Web Deploy profile from your SmarterASP.NET control panel. Never add that credential-bearing profile to this ZIP or source control. - Enable WebSocket support if your plan exposes that setting. The Blazor browser circuit uses SignalR; its companion relay uses regular HTTPS polling.
- Open
https://worldbackup.example.com/health; it should returnstatus: ok. Open the home page and verify pairing and a test-world round trip. - Open the home page and test Download Windows companion. Give users the website address; they can download and install the companion there, then enter the pairing code on the same page.
SmarterASP.NET's current guide describes publishing through a downloaded Web Deploy profile: How to deploy a Blazor application.
No SQL Server database is needed in this version. Configure the site for one worker process / one instance. The device relay is in memory. An IIS recycle or deployment ends pairing sessions; users disconnect the companion and generate a new code. Local file jobs already in progress continue on the PC.
If you later require account-based device registration, pairing that survives website restarts, multiple server instances, or unattended scheduled backups, add persistent identity/session infrastructure rather than scaling this in-memory relay unchanged.
Direct Visual Studio publishing
The recommended script keeps the publisher information consistent. If you bypass it, edit both files before publishing:
src/Mcs.Web/appsettings.json:Publisher.Name,Publisher.SupportEmail, andPublisher.ContactUrl.src/Mcs.Companion/publisher.json:Name,SupportEmail, andContactUrl.
At least one valid contact is required; supplied contacts must pass format validation. Verify that they actually work. The website uses normal ASP.NET configuration overrides, so IIS environment variables Publisher__Name, Publisher__SupportEmail, and Publisher__ContactUrl may override the website settings. Companion identity is loaded from the publisher.json distributed beside its EXE; it is separate from each user's local world settings.
Production website startup and Release companion connection are blocked when publisher/contact configuration is incomplete or invalid. Debug development displays a setup message instead. Keep the actual support address/contact page visible in your distribution README, product listing, and download page as well as the application. For a manually assembled companion ZIP, include publisher.json, mcs.ico, the installer files, a README with your publisher/contact notice, and LICENSE.txt alongside all published runtime files.
To include the companion download in a Visual Studio web publish, first produce the actual companion ZIP using the script above. Copy it into the web project's App_Data/Downloads folder before publishing:
New-Item .\src\Mcs.Web\App_Data\Downloads -ItemType Directory -Force | Out-Null
Copy-Item .\artifacts\CoHo-Appz-World-Backup-Companion-win-x64.zip .\src\Mcs.Web\App_Data\Downloads\ -Force
The web project copies ZIP files from that folder into build and publish output. Configure the web project's publisher settings as described above; the script's settings in artifacts/web do not change the source configuration used by a separate Visual Studio publish. Verify the destination contains the ZIP after deployment, especially if the publish profile removes additional destination files.
Use CoHo Appz World Backup as the primary product title on the download page, with Backup and restore tool for Minecraft worlds as the secondary description. Show the non-affiliation notice prominently and use the new generic folder artwork. Do not upload the old Creeper-like icon or grass-block illustration.
Website companion download
The home page shows a companion download card before the pairing controls, including Windows x64 requirements, ZIP size, and installation instructions. It stays visible after pairing. No pairing code or account is needed to download the installer.
The button requests https://worldbackup.example.com/downloads/companion. ASP.NET sends the ZIP as an attachment named CoHo-Appz-World-Backup-Companion-win-x64.zip, with the ZIP content type and support for HTTP byte-range requests. The route serves only this fixed file from App_Data/Downloads; it does not accept arbitrary filenames or paths. The folder is outside wwwroot, and no separate IIS ZIP MIME mapping is required for this route.
If the package is missing or empty, the page shows Download not available yet instead of a broken link. A direct request returns a clear 404 response. Upload the generated ZIP to the correct folder and reload the page. When releasing an update, replace the ZIP as part of deploying the updated web output.
Install on each PC
- Visit the website on the Windows PC whose worlds you want to manage. Select Download Windows companion, then extract
CoHo-Appz-World-Backup-Companion-win-x64.zip. - Run
Install-Companion.cmd(or the PowerShell installer). - Enter your website URL in the companion.
- Choose the local world folder and a separate backup folder. Optionally import Minecraft settings from the original MCS
.configfile. - Generate the code, connect on the site, and approve the pairing locally.
To install with Windows startup enabled:
.\Install-Companion.ps1 -StartWithWindows
To uninstall, first close the companion after all jobs finish, then run:
.\Install-Companion.ps1 -Uninstall
Uninstall keeps world data, backup archives, description metadata, saved settings, and restore recovery folders. Startup opens the companion; users still pair explicitly for each new session.
Hosting troubleshooting
See Automatic website reconnection for the connection banner, automatic recovery behavior, live interruption checks, and the limits of in-memory pairing across a server restart.
- 500.35 / 500.34: check hosting modes for all ASP.NET Core applications in the shared pool. This project publishes out of process; mixed modes can still fail. A dedicated pool per application is an alternative when available.
- 503: confirm the site is on and its assigned application pool is running. Restart that pool once, then inspect startup logs. If the pool stops again or no log is created, ask hosting support for the IIS substatus and the pool's shutdown/failure events; see
IIS-HOSTING.md. - 500.30 / 500.31: verify the matching runtime, uploaded files, and hosting application configuration.
- Publisher configuration startup error: set the actual publisher and a support email or HTTPS contact page in production configuration, then restart the site. Do not switch production to Development to bypass the check.
- Page loads but controls do not work: inspect the browser console and
_blazorconnection; check WebSocket/SignalR support and HTTPS. - Download not available yet / download returns 404: upload the actual generated companion ZIP to the site's
App_Data/Downloads/CoHo-Appz-World-Backup-Companion-win-x64.zip. Check the hosting application's read access to the file and reload the page. The source ZIP is not the installed companion. - Companion cannot register: verify the root HTTPS URL and
/health, certificate, and outbound access through antivirus/proxy software. - Session ended after deploy/recycle: disconnect in the companion and generate a new code. No backup files were moved to the web server.
- HTTP 429: registration was attempted too often; wait one minute.
- Stale/missing local files: disconnect, check folder selections in the companion, and reconnect. The archive list refreshes after operations or a new pairing.