Danielx64
Danielx64
CC#
Created by Danielx64 on 11/3/2023 in #help
❔ guidance on protecting sensitive details (licence details) needed
Q: does anyone have any guidance on protecting sensitive details (licence name and serial) from being yanked from my app? Vendor says this "The first licensing option is to make a method call at app startup before any UI is referenced to register your license information. This option is quick and easy, and works best for scenarios where Actipro NuGet packages or build servers are used. See the "Licensing Via a RegisterLicense Call" section below for detailed information on this option. The second licensing option is to provide licensing via a licenses.licx file. This option is only available for classic .NET Framework applications that have direct assembly references, and is what Actipro exclusively used prior to v20.1. See the "Licensing Via a Licenses.licx File" section below for detailed information on this option" Further down the page it says this "It is important to protect your licensee and license key combination from decompilers. We highly recommend using some form of string encryption on the licensee and licenseKey values passed into the ActiproLicenseManager.RegisterLicense method. Many obfuscators include string encryption as an option, or you can use other custom logic to scramble/descramble the strings.'
8 replies
CC#
Created by Danielx64 on 6/11/2023 in #help
❔ Needs some help with setting Webview2 option and fixing a known bug
Some background info: I built an app that is currently in production that is pretty much a full screen browser with no address bar or anything like that. It was locked down with most options disabled. It's running well and all but I wanted to extend it a little and add tabs to it (since it was setup to only allow one instance of it running at a time). After seeing this post on stackoverflow (https://stackoverflow.com/a/73087225/1129151), I decided to rebuild it, current source is here (https://github.com/Danielx64/PApps-player/). I'm facing 2 issues: In my current production version, I have the following code:
var options = new CoreWebView2EnvironmentOptions
{
AllowSingleSignOnUsingOSPrimaryAccount = true,
Language = $"{Globals.APP_REQUEST_LANG}"
};

if (!Directory.Exists(Globals.USER_DATA_FOLDER))
{
Directory.CreateDirectory(Globals.USER_DATA_FOLDER);
}
var environment = await CoreWebView2Environment.CreateAsync(null, Globals.USER_DATA_FOLDER, options).ConfigureAwait(true);

await WebView.EnsureCoreWebView2Async(environment).ConfigureAwait(true);
var options = new CoreWebView2EnvironmentOptions
{
AllowSingleSignOnUsingOSPrimaryAccount = true,
Language = $"{Globals.APP_REQUEST_LANG}"
};

if (!Directory.Exists(Globals.USER_DATA_FOLDER))
{
Directory.CreateDirectory(Globals.USER_DATA_FOLDER);
}
var environment = await CoreWebView2Environment.CreateAsync(null, Globals.USER_DATA_FOLDER, options).ConfigureAwait(true);

await WebView.EnsureCoreWebView2Async(environment).ConfigureAwait(true);
Now for some reason I am unable to use that in my current project as it throws CS1503 Argument 1: cannot convert from 'System.Runtime.CompilerServices.ConfiguredTaskAwaitable<Microsoft.Web.WebView2.Core.CoreWebView2Environment>' to 'Microsoft.Web.WebView2.Core.CoreWebView2Environment' (even after editing a few lines to use wv instead and removing await) Right now I am able to get something up and running with
WebView2 wv = new WebView2() { CreationProperties = new CoreWebView2CreationProperties() { UserDataFolder = userDataFolder } };
WebView2 wv = new WebView2() { CreationProperties = new CoreWebView2CreationProperties() { UserDataFolder = userDataFolder } };
But I also need to set CoreWebView2EnvironmentOptions (AllowSingleSignOnUsingOSPrimaryAccount = true) and I am not sure how I can go about this.
3 replies