Use .NET 4.0 version of wyUpdate. Use registry fixes to enable TLS 1.2 and newer for .NET 4.0 apps.
-I used this link https://wyday.com/limelm/help/saas-and-time-limited-licensing/ to do limit update.-I posted .wyu and .wys files to azure (https://nbsstorage20.blob.core.windows.net/wybuild/payslip/%file%https://payslipupdate20200310105823.azurewebsites.net/home/LimitUpdate/?update=%file%&pkey=%urlargs%).-I used wyUpdate.exe -urlargs:"PRODUCT-KEY-GOES-HERE" to download .wyu file on my site but not success, and this is the error message from wybuild(Error trying to save file: Error downloading "https://payslipupdate20200310105823.azurewebsites.net/home/LimitUpdate/?update=phieuluong.1.0.to.1.1.wyu&pkey=582C-UGW4-ETWG-QHXW-ANEH-ZWKN-NSTA": The underlying connection was closed: An unexpected error occurred on a send.)-Here is my site, i write with aspnet core mvc.(I did't use WebAPI.zip because it's very old)using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Net;using System.Threading.Tasks;using System.Xml;using LimeLM_API;using Microsoft.AspNetCore.Http;using Microsoft.AspNetCore.Mvc;using Microsoft.Extensions.Logging;
namespace LimitUpdates.Controllers{ public class HomeController : Controller { public HomeController() { } public async Task<IActionResult> LimitUpdate() {
string[] files = Directory.GetFiles("updates");
string requestedFile = Request.Query["update"]; string updateFile = null;
// get the update file foreach (string file in files) { if (string.Equals(Path.GetFileName(file), requestedFile, StringComparison.InvariantCultureIgnoreCase)) updateFile = file; }
// if updateFile is null, throw a 404 error if (updateFile == null) { Response.Clear();
// throw a 404 error Response.StatusCode = 404; //Response.End(); return null; }
bool validLicense = false;
//TODO: set your API KEY LimeLM.APIKey = ".....";
//TODO: set the version id to limit updates for // the version id is found in the url. For example http://wyday.com/limelm/version/100/ // the version id is 100. const string versionID = "...";
try { using (XmlReader reader = XmlReader.Create(new StringReader(LimeLM.GetPKeyID(versionID, Request.Query["pkey"])))) { reader.ReadToFollowing("rsp");
if (reader["stat"] == "ok") { reader.ReadToFollowing("pkey"); string pkeyID = reader["id"];
using (XmlReader detReader = XmlReader.Create(new StringReader(LimeLM.GetDetails(pkeyID)))) { detReader.ReadToFollowing("rsp");
if (detReader["stat"] == "ok") { detReader.ReadToFollowing("pkey");
// if the pkey isn't revoked (and there's a features block) if (detReader["revoked"] != "true" && detReader.ReadToFollowing("features")) { bool keepLooking = true;
while (keepLooking && detReader.Read()) { switch (detReader.NodeType) { case XmlNodeType.Element: // feature node
if (detReader["name"] == "update_expires") { // see if "update_expires" is later than right now if (DateTime.Parse(detReader["value"]).CompareTo(DateTime.Now) > 0) validLicense = true;
keepLooking = false; }
break; case XmlNodeType.EndElement: if (detReader.Name == "features") keepLooking = false; break; } } } } else // failure { detReader.ReadToFollowing("err");
//TODO: use the error code & message //detReader["code"] //detReader["msg"] } } } else // failure { reader.ReadToFollowing("err");
//TODO: use the error code & message //reader["code"] //reader["msg"] } } } catch (Exception) { // failed to either contact LimeLM or parse the response from LimeLM // TODO: handle the error somehow (log it, notify your support team, etc.) }
// forbid invalid licenses if (!validLicense) { Response.Clear();
// header('HTTP/1.1 403 Forbidden'); Response.StatusCode = 403; //Response.End(); return null; }
var memory = new MemoryStream(); using (var stream = new FileStream(updateFile, FileMode.Open)) { await stream.CopyToAsync(memory); } memory.Position = 0; return File(memory, "application/octet-stream", Path.GetFileName(updateFile));
}
}}
-Before I run my app, I tested and download success on browser.->Please help me, I spend alot of time for this.
Use .NET 4.0 version of wyUpdate. Use registry fixes to enable TLS 1.2 and newer for .NET 4.0 apps.
-My application is windows form (net framework 4.7) with c# language.I used this line code:ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;Process.Start("wyUpdate.exe", "-urlargs:\"" + new TurboActivate(Global.WYDAY_VGUID, "TurboActivate.dat").GetPKey() + "\"");to run update. ->but it's not success. would you like to provide more details or example about Use registry fixes to enable TLS 1.2 and newer for .NET 4.0 apps.