multiple cases and changes (whups forgot to commit)

cases  3664, 3663, 3520 (redux)
This commit is contained in:
2018-12-31 20:59:29 +00:00
parent b2ae7575bc
commit 4c8f4e769f
16 changed files with 243 additions and 84 deletions

View File

@@ -468,8 +468,8 @@ Global
{3EF693E1-F60E-4D0F-929C-CBF8BEF96F12}.Default|x86.Build.0 = Debug|Any CPU {3EF693E1-F60E-4D0F-929C-CBF8BEF96F12}.Default|x86.Build.0 = Debug|Any CPU
{3EF693E1-F60E-4D0F-929C-CBF8BEF96F12}.Release|.NET.ActiveCfg = Release|Any CPU {3EF693E1-F60E-4D0F-929C-CBF8BEF96F12}.Release|.NET.ActiveCfg = Release|Any CPU
{3EF693E1-F60E-4D0F-929C-CBF8BEF96F12}.Release|.NET.Build.0 = Release|Any CPU {3EF693E1-F60E-4D0F-929C-CBF8BEF96F12}.Release|.NET.Build.0 = Release|Any CPU
{3EF693E1-F60E-4D0F-929C-CBF8BEF96F12}.Release|Any CPU.ActiveCfg = Release|x86 {3EF693E1-F60E-4D0F-929C-CBF8BEF96F12}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3EF693E1-F60E-4D0F-929C-CBF8BEF96F12}.Release|Any CPU.Build.0 = Release|x86 {3EF693E1-F60E-4D0F-929C-CBF8BEF96F12}.Release|Any CPU.Build.0 = Release|Any CPU
{3EF693E1-F60E-4D0F-929C-CBF8BEF96F12}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {3EF693E1-F60E-4D0F-929C-CBF8BEF96F12}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{3EF693E1-F60E-4D0F-929C-CBF8BEF96F12}.Release|Mixed Platforms.Build.0 = Release|Any CPU {3EF693E1-F60E-4D0F-929C-CBF8BEF96F12}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{3EF693E1-F60E-4D0F-929C-CBF8BEF96F12}.Release|WBI.ActiveCfg = Release|Any CPU {3EF693E1-F60E-4D0F-929C-CBF8BEF96F12}.Release|WBI.ActiveCfg = Release|Any CPU
@@ -1074,6 +1074,7 @@ Global
{CE73BA18-914D-4426-8888-1DA0F0FC4764}.ReleaseX86AyaNova|x86.Build.0 = Release|x86 {CE73BA18-914D-4426-8888-1DA0F0FC4764}.ReleaseX86AyaNova|x86.Build.0 = Release|x86
{5407E64B-951B-414D-B532-4AF2EDBDD9FD}.Debug|.NET.ActiveCfg = Debug|x86 {5407E64B-951B-414D-B532-4AF2EDBDD9FD}.Debug|.NET.ActiveCfg = Debug|x86
{5407E64B-951B-414D-B532-4AF2EDBDD9FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5407E64B-951B-414D-B532-4AF2EDBDD9FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5407E64B-951B-414D-B532-4AF2EDBDD9FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5407E64B-951B-414D-B532-4AF2EDBDD9FD}.Debug|Any CPU.Deploy.0 = Debug|Any CPU {5407E64B-951B-414D-B532-4AF2EDBDD9FD}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{5407E64B-951B-414D-B532-4AF2EDBDD9FD}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 {5407E64B-951B-414D-B532-4AF2EDBDD9FD}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{5407E64B-951B-414D-B532-4AF2EDBDD9FD}.Debug|Mixed Platforms.Build.0 = Debug|x86 {5407E64B-951B-414D-B532-4AF2EDBDD9FD}.Debug|Mixed Platforms.Build.0 = Debug|x86

View File

@@ -9,7 +9,7 @@ Release procedure as of 6/15/17
6 Build AyaNova.exe project only watch for errors 6 Build AyaNova.exe project only watch for errors
7 Build->Configuration manager, change AyaNova.exe build back to "AnyCPU" from "x86" 7 Build->Configuration manager, change AyaNova.exe build back to "AnyCPU" from "x86"
8 Select MBI project in solution explorer then right click and Publish watch for errors 8 Select MBI project in solution explorer then right click and Publish watch for errors
9 Select WBI project in solution explorer then right click and Publish watch for errors 9 Select WBI project in solution explorer then right click and Publish WebSite watch for errors
10 Select Tools->"AyaNova obfuscate and build installers" watch for errors 10 Select Tools->"AyaNova obfuscate and build installers" watch for errors
Find installers ready to go in the Data/AyaNova/Installs folder Find installers ready to go in the Data/AyaNova/Installs folder
@@ -17,3 +17,15 @@ Find installers ready to go in the Data/AyaNova/Installs folder
See case 3482 for release steps See case 3482 for release steps
$profit% :) $profit% :)
=-=-=-=-=-=-
FIPS BUILD
First enable fips build:
1) Enable FIPS pre-processor directive in two files:
BusinessIdentity.vb - Uncomment line 328 to enable fips and comment OUT line 329 that disables FIPS build
GlobalEx.cs - Uncomment line 11 at top of file
2) Follow release procedure above
3) Copy build files out of dev VM, rename them all to prepend fips string at start with this dos command: forfiles /S /M *.exe /C "cmd /c rename @file fips@file"
4) Upload to server, announce to USDA forest service Peter Bedecker
5) Disable fips mode in build by reversing step 1
6) Rebuild installers and all release version files just to be sure that I dont' accidentally copy them off and give them to someone else down the road

View File

@@ -13,7 +13,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<publishTime>07/02/2018 11:40:56</publishTime> <publishTime>07/02/2018 11:40:56</publishTime>
</File> </File>
<File Include="bin/App_global.asax.compiled"> <File Include="bin/App_global.asax.compiled">
<publishTime>08/22/2018 16:48:02</publishTime> <publishTime>09/13/2018 15:49:49</publishTime>
</File> </File>
<File Include="bin/App_global.asax.dll"> <File Include="bin/App_global.asax.dll">
<publishTime>06/14/2017 11:29:54</publishTime> <publishTime>06/14/2017 11:29:54</publishTime>
@@ -34,37 +34,37 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<publishTime>07/02/2018 11:40:10</publishTime> <publishTime>07/02/2018 11:40:10</publishTime>
</File> </File>
<File Include="bin/clients.aspx.cdcab7d2.compiled"> <File Include="bin/clients.aspx.cdcab7d2.compiled">
<publishTime>08/22/2018 16:48:02</publishTime> <publishTime>09/13/2018 15:49:49</publishTime>
</File> </File>
<File Include="bin/cmd.aspx.cdcab7d2.compiled"> <File Include="bin/cmd.aspx.cdcab7d2.compiled">
<publishTime>08/22/2018 16:48:02</publishTime> <publishTime>09/13/2018 15:49:49</publishTime>
</File> </File>
<File Include="bin/CSLA.Core.Bindablebase.dll"> <File Include="bin/CSLA.Core.Bindablebase.dll">
<publishTime>07/02/2018 11:48:47</publishTime> <publishTime>09/13/2018 13:53:00</publishTime>
</File> </File>
<File Include="bin/CSLA.dll"> <File Include="bin/CSLA.dll">
<publishTime>08/22/2018 16:46:15</publishTime> <publishTime>09/13/2018 15:47:39</publishTime>
</File> </File>
<File Include="bin/CSLA.Server.DataPortal.dll"> <File Include="bin/CSLA.Server.DataPortal.dll">
<publishTime>07/02/2018 11:48:49</publishTime> <publishTime>09/13/2018 13:53:02</publishTime>
</File> </File>
<File Include="bin/default.aspx.cdcab7d2.compiled"> <File Include="bin/default.aspx.cdcab7d2.compiled">
<publishTime>08/22/2018 16:48:02</publishTime> <publishTime>09/13/2018 15:49:49</publishTime>
</File> </File>
<File Include="bin/FirebirdSql.Data.FirebirdClient.dll"> <File Include="bin/FirebirdSql.Data.FirebirdClient.dll">
<publishTime>07/02/2018 11:40:09</publishTime> <publishTime>07/02/2018 11:40:09</publishTime>
</File> </File>
<File Include="bin/GZTW.AyaNova.BLL.dll"> <File Include="bin/GZTW.AyaNova.BLL.dll">
<publishTime>08/22/2018 16:47:06</publishTime> <publishTime>09/13/2018 15:48:54</publishTime>
</File> </File>
<File Include="bin/GZTW.AyaNovaMBI.dll"> <File Include="bin/GZTW.AyaNovaMBI.dll">
<publishTime>08/22/2018 16:47:48</publishTime> <publishTime>09/13/2018 15:49:35</publishTime>
</File> </File>
<File Include="bin/GZTW.AyaNovaMBI.Pages.dll"> <File Include="bin/GZTW.AyaNovaMBI.Pages.dll">
<publishTime>08/22/2018 16:48:02</publishTime> <publishTime>09/13/2018 15:49:49</publishTime>
</File> </File>
<File Include="bin/GZTW.Data.dll"> <File Include="bin/GZTW.Data.dll">
<publishTime>07/02/2018 11:48:49</publishTime> <publishTime>09/13/2018 13:53:02</publishTime>
</File> </File>
<File Include="bin/GZTW.MBI.dll"> <File Include="bin/GZTW.MBI.dll">
<publishTime>06/14/2017 12:04:42</publishTime> <publishTime>06/14/2017 12:04:42</publishTime>
@@ -73,58 +73,58 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<publishTime>06/14/2017 11:32:19</publishTime> <publishTime>06/14/2017 11:32:19</publishTime>
</File> </File>
<File Include="bin/GZTW.Profile.dll"> <File Include="bin/GZTW.Profile.dll">
<publishTime>07/02/2018 11:48:47</publishTime> <publishTime>09/13/2018 13:53:00</publishTime>
</File> </File>
<File Include="bin/labor.aspx.cdcab7d2.compiled"> <File Include="bin/labor.aspx.cdcab7d2.compiled">
<publishTime>08/22/2018 16:48:02</publishTime> <publishTime>09/13/2018 15:49:49</publishTime>
</File> </File>
<File Include="bin/memoedit.aspx.cdcab7d2.compiled"> <File Include="bin/memoedit.aspx.cdcab7d2.compiled">
<publishTime>08/22/2018 16:48:02</publishTime> <publishTime>09/13/2018 15:49:49</publishTime>
</File> </File>
<File Include="bin/memoto.aspx.cdcab7d2.compiled"> <File Include="bin/memoto.aspx.cdcab7d2.compiled">
<publishTime>08/22/2018 16:48:02</publishTime> <publishTime>09/13/2018 15:49:49</publishTime>
</File> </File>
<File Include="bin/Newtonsoft.Json.dll"> <File Include="bin/Newtonsoft.Json.dll">
<publishTime>07/02/2018 12:33:05</publishTime> <publishTime>07/02/2018 12:33:05</publishTime>
</File> </File>
<File Include="bin/ro.aspx.cdcab7d2.compiled"> <File Include="bin/ro.aspx.cdcab7d2.compiled">
<publishTime>08/22/2018 16:48:02</publishTime> <publishTime>09/13/2018 15:49:49</publishTime>
</File> </File>
<File Include="bin/sched2labor.aspx.cdcab7d2.compiled"> <File Include="bin/sched2labor.aspx.cdcab7d2.compiled">
<publishTime>08/22/2018 16:48:02</publishTime> <publishTime>09/13/2018 15:49:49</publishTime>
</File> </File>
<File Include="bin/schedule.aspx.cdcab7d2.compiled"> <File Include="bin/schedule.aspx.cdcab7d2.compiled">
<publishTime>08/22/2018 16:48:02</publishTime> <publishTime>09/13/2018 15:49:49</publishTime>
</File> </File>
<File Include="bin/sign.aspx.cdcab7d2.compiled"> <File Include="bin/sign.aspx.cdcab7d2.compiled">
<publishTime>08/22/2018 16:48:02</publishTime> <publishTime>09/13/2018 15:49:49</publishTime>
</File> </File>
<File Include="bin/status.aspx.cdcab7d2.compiled"> <File Include="bin/status.aspx.cdcab7d2.compiled">
<publishTime>08/22/2018 16:48:02</publishTime> <publishTime>09/13/2018 15:49:49</publishTime>
</File> </File>
<File Include="clients.aspx"> <File Include="clients.aspx">
<publishTime>08/22/2018 16:47:53</publishTime> <publishTime>09/13/2018 15:49:39</publishTime>
</File> </File>
<File Include="cmd.aspx"> <File Include="cmd.aspx">
<publishTime>08/22/2018 16:47:53</publishTime> <publishTime>09/13/2018 15:49:39</publishTime>
</File> </File>
<File Include="default.aspx"> <File Include="default.aspx">
<publishTime>08/22/2018 16:47:53</publishTime> <publishTime>09/13/2018 15:49:39</publishTime>
</File> </File>
<File Include="jquery-1.4.4.min.js"> <File Include="jquery-1.4.4.min.js">
<publishTime>07/02/2018 11:40:56</publishTime> <publishTime>07/02/2018 11:40:56</publishTime>
</File> </File>
<File Include="labor.aspx"> <File Include="labor.aspx">
<publishTime>08/22/2018 16:47:53</publishTime> <publishTime>09/13/2018 15:49:39</publishTime>
</File> </File>
<File Include="mbi.css"> <File Include="mbi.css">
<publishTime>07/02/2018 11:40:55</publishTime> <publishTime>07/02/2018 11:40:55</publishTime>
</File> </File>
<File Include="memoedit.aspx"> <File Include="memoedit.aspx">
<publishTime>08/22/2018 16:47:53</publishTime> <publishTime>09/13/2018 15:49:39</publishTime>
</File> </File>
<File Include="memoto.aspx"> <File Include="memoto.aspx">
<publishTime>08/22/2018 16:47:53</publishTime> <publishTime>09/13/2018 15:49:39</publishTime>
</File> </File>
<File Include="ok.gif"> <File Include="ok.gif">
<publishTime>07/02/2018 11:40:55</publishTime> <publishTime>07/02/2018 11:40:55</publishTime>
@@ -133,25 +133,25 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<publishTime>07/02/2018 11:40:55</publishTime> <publishTime>07/02/2018 11:40:55</publishTime>
</File> </File>
<File Include="PrecompiledApp.config"> <File Include="PrecompiledApp.config">
<publishTime>08/22/2018 16:47:49</publishTime> <publishTime>09/13/2018 15:49:36</publishTime>
</File> </File>
<File Include="ro.aspx"> <File Include="ro.aspx">
<publishTime>08/22/2018 16:47:53</publishTime> <publishTime>09/13/2018 15:49:39</publishTime>
</File> </File>
<File Include="sched2labor.aspx"> <File Include="sched2labor.aspx">
<publishTime>08/22/2018 16:47:53</publishTime> <publishTime>09/13/2018 15:49:39</publishTime>
</File> </File>
<File Include="schedule.aspx"> <File Include="schedule.aspx">
<publishTime>08/22/2018 16:47:53</publishTime> <publishTime>09/13/2018 15:49:39</publishTime>
</File> </File>
<File Include="sig.js"> <File Include="sig.js">
<publishTime>07/02/2018 11:40:56</publishTime> <publishTime>07/02/2018 11:40:56</publishTime>
</File> </File>
<File Include="sign.aspx"> <File Include="sign.aspx">
<publishTime>08/22/2018 16:47:53</publishTime> <publishTime>09/13/2018 15:49:39</publishTime>
</File> </File>
<File Include="status.aspx"> <File Include="status.aspx">
<publishTime>08/22/2018 16:47:53</publishTime> <publishTime>09/13/2018 15:49:39</publishTime>
</File> </File>
<File Include="user.gif"> <File Include="user.gif">
<publishTime>07/02/2018 11:40:56</publishTime> <publishTime>07/02/2018 11:40:56</publishTime>

View File

@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Ground Zero Tech-Works Inc.")] [assembly: AssemblyCompany("Ground Zero Tech-Works Inc.")]
[assembly: AssemblyProduct("AyaNova.PlugIn.QBOI")] [assembly: AssemblyProduct("AyaNova.PlugIn.QBOI")]
[assembly: AssemblyCopyright("Copyright © 2017-2018")] [assembly: AssemblyCopyright("Copyright © 2017-2019")]
[assembly: AssemblyTrademark("AyaNova is a registered trademark of Ground Zero Tech-Works Inc.")] [assembly: AssemblyTrademark("AyaNova is a registered trademark of Ground Zero Tech-Works Inc.")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
@@ -33,4 +33,4 @@ using System.Runtime.InteropServices;
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.5.0.0")] [assembly: AssemblyVersion("7.5.0.0")]
[assembly: AssemblyFileVersion("7.5.3.0")] [assembly: AssemblyFileVersion("7.5.4.0")]

View File

@@ -59,7 +59,7 @@ namespace AyaNova.PlugIn.QBOI
public string PluginVersion public string PluginVersion
{ {
get { return "7.5"; }//if patch then 7.3 (patch 1) etc get { return "7.5 (patch 4)"; }//if patch then 7.3 (patch 1) etc
} }
public string About public string About

View File

@@ -399,8 +399,12 @@ namespace AyaNova.PlugIn.QBOI
/// <returns></returns> /// <returns></returns>
public static pfstat PreFlightCheck() public static pfstat PreFlightCheck()
{ {
IntegrationLog.Log(QBID, "PFC: start");
if (!_AuthenticationCompleted) if (!_AuthenticationCompleted)
{
IntegrationLog.Log(QBID, "PFC: Authenticating...");
StartAuthorization(); StartAuthorization();
}
while (!_AuthenticationCompleted) while (!_AuthenticationCompleted)
{ {
@@ -408,6 +412,8 @@ namespace AyaNova.PlugIn.QBOI
//TODO: add timeout here //TODO: add timeout here
} }
IntegrationLog.Log(QBID, "PFC: Authentication completed, validating company data");
if (QBValidate() == pfstat.Cancel) if (QBValidate() == pfstat.Cancel)
{ {
IntegrationLog.Log(QBID, "PFC: Unable to validate QuickBooks connection, user selected cancel"); IntegrationLog.Log(QBID, "PFC: Unable to validate QuickBooks connection, user selected cancel");
@@ -422,6 +428,8 @@ namespace AyaNova.PlugIn.QBOI
} }
IntegrationLog.Log(QBID, "PFC: Checking integration object...");
IntegrationObjectCheck(); IntegrationObjectCheck();
if (ValidateSettings(false) == pfstat.Cancel) if (ValidateSettings(false) == pfstat.Cancel)
@@ -430,6 +438,7 @@ namespace AyaNova.PlugIn.QBOI
return pfstat.Cancel; return pfstat.Cancel;
} }
IntegrationLog.Log(QBID, "PFC: Checking cached mappings for validity...");
//Added: 18-Nov-2006 CASE 163 //Added: 18-Nov-2006 CASE 163
//check that linked items in integration map exist in QB //check that linked items in integration map exist in QB
@@ -518,6 +527,8 @@ namespace AyaNova.PlugIn.QBOI
} }
} }
IntegrationLog.Log(QBID, "PFC: pre-flight check completed - OK");
return pfstat.OK; return pfstat.OK;
} }
@@ -600,6 +611,47 @@ namespace AyaNova.PlugIn.QBOI
/// </summary> /// </summary>
public static pfstat QBValidate() public static pfstat QBValidate()
{ {
/**
12/28/2018 Error reported by user:
*
* All my clients are set to active but when I connect QBOI to Ayanova it keeps telling me that all the clients are set to inactive.
Unexpected duplicate value returned by QuickBooks Online company info query
Please copy this information to AyaNova technical support (support@ayanova.com)
Company info returned:
KEY: NeoEnabled, VALUE: true
KEY: IsQbdtMigrated, VALUE: true
KEY: MigrationDate, VALUE: Nov 20, 2018 10:38:44 AM
KEY: MigrationSource, VALUE: QuickBooks-Unknown ActiveX
KEY: SubscriptionStatus, VALUE: PAID
KEY: OfferingSku, VALUE: QuickBooks Online Essentials
KEY: PayrollFeature, VALUE: false
KEY: AccountantFeature, VALUE: false
KEY: QBOIndustryType, VALUE: I sell products & services
KEY: ItemCategoriesFeature, VALUE: true
KEY: AssignedTime, VALUE: 11/09/2018 11:50:11
*/
/* /*
* Error reported by user: * Error reported by user:
@@ -667,6 +719,10 @@ KEY: AssignedTime, VALUE: 12/08/2017 18:52:04
//case 3520 //case 3520
bool dupeKeyFoundInCompanyInfo = false; bool dupeKeyFoundInCompanyInfo = false;
//case 3520 redux 12/31/2018
//working theory is that this is getting called when it's already been populated by an earlier action so it makes all items appear to be dupes because they were already set in qbcompprefs
QCompOtherPrefs.Clear();
//Get the country and latest version supported //Get the country and latest version supported
//QB Online doesn't really have a "version", only a minor version //QB Online doesn't really have a "version", only a minor version
//for the sake of compatibility just setting this to 3 which is the major api version number //for the sake of compatibility just setting this to 3 which is the major api version number

View File

@@ -169,6 +169,9 @@ namespace AyaNova
private void copyExtendedSupportInfoToClipboardToolStripMenuItem_Click(object sender, EventArgs e) private void copyExtendedSupportInfoToClipboardToolStripMenuItem_Click(object sender, EventArgs e)
{ {
//case 3663
Util.LogFullSupportInfoToFile();
StringBuilder sbInfo = new StringBuilder(); StringBuilder sbInfo = new StringBuilder();
string currentAssemblyDirectoryName = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); string currentAssemblyDirectoryName = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
//sbInfo.Append("Tech support info\r\n=-=-=-=-=-=-=-=-=-\r\n"); //sbInfo.Append("Tech support info\r\n=-=-=-=-=-=-=-=-=-\r\n");
@@ -226,6 +229,19 @@ namespace AyaNova
} }
//case 3664 get integration log
sbInfo.Append("\r\n\r\n\r\n");
//The following block allows to read the AyaLog.txt file even though it's locked by the logger
sbInfo.Append("INTEGRATION LOG\r\n=-=-=-=-=-=-=-=-=-\r\n");
IntegrationLogList ill = IntegrationLogList.GetList();
foreach (IntegrationLogList.IntegrationLogListInfo i in ill)
{
sbInfo.AppendLine(i.LogEntry);
}
sbInfo.Append("\r\n\r\n\r\n"); sbInfo.Append("\r\n\r\n\r\n");

View File

@@ -62,4 +62,4 @@ using System.Runtime.InteropServices;
[assembly: log4net.Config.XmlConfigurator(ConfigFile="Log4Net.config",Watch=true)] [assembly: log4net.Config.XmlConfigurator(ConfigFile="Log4Net.config",Watch=true)]
//[assembly: log4net.Config.XmlConfigurator(Watch=true)] //[assembly: log4net.Config.XmlConfigurator(Watch=true)]
[assembly: ComVisibleAttribute(false)] [assembly: ComVisibleAttribute(false)]
[assembly: AssemblyFileVersionAttribute("7.5.8.0")] [assembly: AssemblyFileVersionAttribute("7.5.9.0")]

View File

@@ -1353,6 +1353,7 @@
</None> </None>
<None Include="AyaNova.exe.manifest" /> <None Include="AyaNova.exe.manifest" />
<None Include="Log4Net.config"> <None Include="Log4Net.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -15,7 +15,7 @@
</appender> </appender>
<root> <root>
<level value="ALL" /> <level value="INFO" />
<!--Default is "INFO", set to "ALL" if requested by tech support only--> <!--Default is "INFO", set to "ALL" if requested by tech support only-->
<appender-ref ref="RollingLogFileAppender" /> <appender-ref ref="RollingLogFileAppender" />

View File

@@ -7378,6 +7378,17 @@ At first I was happy to find your code that solved my problem, but I did not lik
return sb.ToString(); return sb.ToString();
} }
//case 3663
static public void LogFullSupportInfoToFile()
{
log.Info("##############################");
log.Info("Support info requested, logging extra:\r\n");
log.Info(FullSupportInfo());
log.Info("##############################");
}
static public string BriefSupportInfo() static public string BriefSupportInfo()
{ {
log.Debug("BriefSupportInfo"); log.Debug("BriefSupportInfo");
@@ -7406,7 +7417,8 @@ At first I was happy to find your code that solved my problem, but I did not lik
////Sub release version if any ////Sub release version if any
sb.Append(AyaBizUtils.SubVersion); sb.Append(AyaBizUtils.SubVersion);
// sb.Append("Options:\r\n"); // sb.Append("Options:\r\n");
// sb.Append(AyaBizUtils.View()); // sb.Append(AyaBizUtils.View());

View File

@@ -15,7 +15,7 @@
</appender> </appender>
<root> <root>
<level value="ALL" /> <level value="INFO" />
<!--Default is "INFO", set to "ALL" if requested by tech support only--> <!--Default is "INFO", set to "ALL" if requested by tech support only-->
<appender-ref ref="RollingLogFileAppender" /> <appender-ref ref="RollingLogFileAppender" />

View File

@@ -64,4 +64,4 @@ using System.Security.Permissions;
// Configure log4net using the .config file // Configure log4net using the .config file
//[assembly: log4net.Config.XmlConfigurator(ConfigFile="Log4Net.config",Watch=true)] //[assembly: log4net.Config.XmlConfigurator(ConfigFile="Log4Net.config",Watch=true)]
//[assembly: log4net.Config.XmlConfigurator( ConfigFile="Log4Net.config",Watch=true )] //[assembly: log4net.Config.XmlConfigurator( ConfigFile="Log4Net.config",Watch=true )]
[assembly: AssemblyFileVersionAttribute("7.5.8.0")] [assembly: AssemblyFileVersionAttribute("7.5.9.0")]

View File

@@ -158,8 +158,8 @@
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Newtonsoft.Json.5.0.4\lib\net40\Newtonsoft.Json.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<Private>True</Private> <HintPath>..\..\..\3rdprtylibs\json.net.40\Newtonsoft.Json.dll</HintPath>
</Reference> </Reference>
<Reference Include="System"> <Reference Include="System">
<Name>System</Name> <Name>System</Name>
@@ -293,11 +293,15 @@
<Compile Include="GZTW.AyaNova.BLL\FollowUpListForUser.cs" /> <Compile Include="GZTW.AyaNova.BLL\FollowUpListForUser.cs" />
<Compile Include="GZTW.AyaNova.BLL\HeadOfficeExistanceChecker.cs" /> <Compile Include="GZTW.AyaNova.BLL\HeadOfficeExistanceChecker.cs" />
<Compile Include="GZTW.AyaNova.BLL\HeadOfficeUnitPickList.cs" /> <Compile Include="GZTW.AyaNova.BLL\HeadOfficeUnitPickList.cs" />
<Compile Include="GZTW.AyaNova.BLL\IntegrationLogList.cs" />
<Compile Include="GZTW.AyaNova.BLL\IntegrationSimple.cs" /> <Compile Include="GZTW.AyaNova.BLL\IntegrationSimple.cs" />
<Compile Include="GZTW.AyaNova.BLL\MemoList.cs"> <Compile Include="GZTW.AyaNova.BLL\MemoList.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="GZTW.AyaNova.BLL\MemoListRi.cs" /> <Compile Include="GZTW.AyaNova.BLL\MemoListRi.cs" />
<Compile Include="GZTW.AyaNova.BLL\NotifyDeliveryLogList.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="GZTW.AyaNova.BLL\OSVersionInfo.cs" /> <Compile Include="GZTW.AyaNova.BLL\OSVersionInfo.cs" />
<Compile Include="GZTW.AyaNova.BLL\PartInventoryAdjustmentListDetailed.cs" /> <Compile Include="GZTW.AyaNova.BLL\PartInventoryAdjustmentListDetailed.cs" />
<Compile Include="GZTW.AyaNova.BLL\GuidFetcher.cs" /> <Compile Include="GZTW.AyaNova.BLL\GuidFetcher.cs" />
@@ -508,9 +512,6 @@
<Compile Include="GZTW.AyaNova.BLL\NotifyDeliveryLog.cs"> <Compile Include="GZTW.AyaNova.BLL\NotifyDeliveryLog.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="GZTW.AyaNova.BLL\NotifyDeliveryLogList.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="GZTW.AyaNova.BLL\NotifyDeliveryMessageFormats.cs"> <Compile Include="GZTW.AyaNova.BLL\NotifyDeliveryMessageFormats.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>

View File

@@ -77,7 +77,7 @@ namespace GZTW.AyaNova.BLL
//Case 508 //Case 508
private string _DigestValue; private string _DigestValue;
// private string _status; private string _LicenseValidationStatus;
private DateTime _Generated; private DateTime _Generated;
private DateTime _InstallableUntil; private DateTime _InstallableUntil;
private bool _Installable; private bool _Installable;
@@ -337,7 +337,7 @@ namespace GZTW.AyaNova.BLL
//{ //{
// get // get
// { // {
// return _status; // return _LicenseValidationStatus;
// } // }
//} //}
@@ -691,44 +691,56 @@ namespace GZTW.AyaNova.BLL
/// <param name="Criteria"></param> /// <param name="Criteria"></param>
protected override void DataPortal_Fetch(object Criteria) protected override void DataPortal_Fetch(object Criteria)
{ {
this._LicenseValidationStatus = "";
//Fetching license key //Fetching license key
//sets all settings to safe mode before fetch and validate //sets all settings to safe mode before fetch and validate
InValidate(); InValidate();
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 2";
Criteria crit = (Criteria)Criteria; Criteria crit = (Criteria)Criteria;
#if(FIPS_MODE) #if(FIPS_MODE)
//case 3378 //case 3378
bool bMustUpdate = false;//if it has to decrypt the key and ex data then it should save it back immediately here bool bMustUpdate = false;//if it has to decrypt the key and ex data then it should save it back immediately here
#endif #endif
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 3";
using (SafeDataReader dataReader = DBUtil.GetReaderFromSQLString("SELECT * FROM aGlobalEx")) using (SafeDataReader dataReader = DBUtil.GetReaderFromSQLString("SELECT * FROM aGlobalEx"))
{ {
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 4";
if (dataReader.Read()) if (dataReader.Read())
{ {
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 5";
try try
{ {
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 6";
//schema version //schema version
mDBSchema = dataReader.GetInt32("aDBSchema"); mDBSchema = dataReader.GetInt32("aDBSchema");
//Global data //Global data
int nTempsize = dataReader.GetInt32("aGlobalDataSize"); int nTempsize = dataReader.GetInt32("aGlobalDataSize");
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 7";
if (nTempsize > 0) if (nTempsize > 0)
{ {
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 8";
byte[] temp = new Byte[nTempsize]; byte[] temp = new Byte[nTempsize];
dataReader.GetBytes("aGlobalData", 0, temp, 0, nTempsize); dataReader.GetBytes("aGlobalData", 0, temp, 0, nTempsize);
#if(FIPS_MODE) #if(FIPS_MODE)
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 9";
//case 3378 //case 3378
string sKey = new UTF8Encoding().GetString(temp); string sKey = new UTF8Encoding().GetString(temp);
if (sKey.Contains("LicenseKey")) if (sKey.Contains("LicenseKey"))
{ //already stored decrypted { //already stored decrypted
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 9-PathA";
_FIPS_READY = true;//flag for the globalEx block below which is not as easily identifiable as decrypted _FIPS_READY = true;//flag for the globalEx block below which is not as easily identifiable as decrypted
mbGlobalData = temp; mbGlobalData = temp;
} }
else else
{ {
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 9-PathB";
//trigger a save after all is decrypted //trigger a save after all is decrypted
bMustUpdate = true; bMustUpdate = true;
/*shaM.ComputeHash(enc.GetBytes("Who is John Galt?"))*/ /*shaM.ComputeHash(enc.GetBytes("Who is John Galt?"))*/
@@ -742,7 +754,7 @@ namespace GZTW.AyaNova.BLL
} }
#else #else
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 9-PathC";
/*shaM.ComputeHash(enc.GetBytes("Who is John Galt?"))*/ /*shaM.ComputeHash(enc.GetBytes("Who is John Galt?"))*/
byte[] bkey = new byte[32] { 0xAE, 0x6E, 0x53, 0x24, 0xC6, 0x53, 0x1D, 0x88, 0x90, 0x12, 0x80, 0xCC, 0x19, 0x88, 0x71, 0x38, 0xA3, 0xBF, 0x63, 0x64, 0xCB, 0x0C, 0xED, 0x50, 0x47, 0xCA, 0x96, 0x8C, 0x27, 0xCD, 0xD2, 0x64 }; byte[] bkey = new byte[32] { 0xAE, 0x6E, 0x53, 0x24, 0xC6, 0x53, 0x1D, 0x88, 0x90, 0x12, 0x80, 0xCC, 0x19, 0x88, 0x71, 0x38, 0xA3, 0xBF, 0x63, 0x64, 0xCB, 0x0C, 0xED, 0x50, 0x47, 0xCA, 0x96, 0x8C, 0x27, 0xCD, 0xD2, 0x64 };
/*shaM.ComputeHash(enc.GetBytes("License IV"))*/ /*shaM.ComputeHash(enc.GetBytes("License IV"))*/
@@ -756,7 +768,7 @@ namespace GZTW.AyaNova.BLL
else else
throw new InvalidOperationException(); throw new InvalidOperationException();
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 10";
//Global data EX //Global data EX
nTempsize = dataReader.GetInt32("aGlobalDataExSize"); nTempsize = dataReader.GetInt32("aGlobalDataExSize");
@@ -764,16 +776,18 @@ namespace GZTW.AyaNova.BLL
if (nTempsize > 0) if (nTempsize > 0)
{ {
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 11";
//Get the data... //Get the data...
byte[] temp = new Byte[nTempsize]; byte[] temp = new Byte[nTempsize];
dataReader.GetBytes("aGlobalDataEx", 0, temp, 0, nTempsize); dataReader.GetBytes("aGlobalDataEx", 0, temp, 0, nTempsize);
//Into a memory stream... //Into a memory stream...
MemoryStream mstream = null; MemoryStream mstream = null;
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 12";
#if(FIPS_MODE) #if(FIPS_MODE)
if (!_FIPS_READY) if (!_FIPS_READY)
{ {
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 12-A";
//Decrypt the data... //Decrypt the data...
UTF8Encoding enc = new UTF8Encoding(); UTF8Encoding enc = new UTF8Encoding();
//SHA256 shaM = new SHA256Managed(); //SHA256 shaM = new SHA256Managed();
@@ -787,11 +801,13 @@ namespace GZTW.AyaNova.BLL
} }
else else
{ {
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 12-B";
//already fips ready (decrypted in db) so just process it //already fips ready (decrypted in db) so just process it
mstream = new MemoryStream(temp); mstream = new MemoryStream(temp);
} }
#else #else
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 12-C";
//Decrypt the data... //Decrypt the data...
UTF8Encoding enc = new UTF8Encoding(); UTF8Encoding enc = new UTF8Encoding();
//SHA256 shaM = new SHA256Managed(); //SHA256 shaM = new SHA256Managed();
@@ -801,18 +817,20 @@ namespace GZTW.AyaNova.BLL
byte[] biv = new byte[32] { 0x9F, 0xDF, 0x65, 0x02, 0xA8, 0x48, 0x79, 0x2D, 0xC2, 0xD9, 0xCB, 0xCB, 0x9F, 0x0C, 0x8B, 0x55, 0x3F, 0x2E, 0x92, 0x3C, 0x48, 0xAD, 0xDC, 0xF4, 0x53, 0x03, 0x82, 0x29, 0x80, 0x28, 0x45, 0x1D }; byte[] biv = new byte[32] { 0x9F, 0xDF, 0x65, 0x02, 0xA8, 0x48, 0x79, 0x2D, 0xC2, 0xD9, 0xCB, 0xCB, 0x9F, 0x0C, 0x8B, 0x55, 0x3F, 0x2E, 0x92, 0x3C, 0x48, 0xAD, 0xDC, 0xF4, 0x53, 0x03, 0x82, 0x29, 0x80, 0x28, 0x45, 0x1D };
CipherWrapper c = new CipherWrapper(bkey); CipherWrapper c = new CipherWrapper(bkey);
mstream = new MemoryStream(c.DecryptMessage(temp, biv)); mstream = new MemoryStream(c.DecryptMessage(temp, biv));
#endif #endif
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 13";
//De-serialize it into the AGlobalExData object... //De-serialize it into the AGlobalExData object...
BinaryFormatter bformatter = new BinaryFormatter(); BinaryFormatter bformatter = new BinaryFormatter();
bformatter.AssemblyFormat = System.Runtime.Serialization.Formatters.FormatterAssemblyStyle.Simple; bformatter.AssemblyFormat = System.Runtime.Serialization.Formatters.FormatterAssemblyStyle.Simple;
try try
{ {
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 13-A";
_AGlobalExData = (AGlobalExData)bformatter.Deserialize(mstream); _AGlobalExData = (AGlobalExData)bformatter.Deserialize(mstream);
} }
catch catch
{ {
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 13-B";
_AGlobalExData = new AGlobalExData(); _AGlobalExData = new AGlobalExData();
_AGlobalExData.EvalExpire = System.DateTime.Now; _AGlobalExData.EvalExpire = System.DateTime.Now;
_AGlobalExData.EvalAdvanceReference = System.DateTime.Now; _AGlobalExData.EvalAdvanceReference = System.DateTime.Now;
@@ -822,9 +840,13 @@ namespace GZTW.AyaNova.BLL
else else
throw new InvalidOperationException(); throw new InvalidOperationException();
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 14";
} }
catch (Exception ex) catch (Exception ex)
{//this will be caught if the fields requested above don't exist {
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 15";
//this will be caught if the fields requested above don't exist
//or there is *any* problem dealing with them //or there is *any* problem dealing with them
//which generally will be that the database is a pre-release one they //which generally will be that the database is a pre-release one they
//are trying to use or they have screwed with the data somehow //are trying to use or they have screwed with the data somehow
@@ -832,21 +854,22 @@ namespace GZTW.AyaNova.BLL
//string s=ex.Message; //string s=ex.Message;
#else #else
throw new System.ApplicationException( throw new System.ApplicationException(
"\r\n************************************************\r\n" + "\r\n************************************************\r\n" +
"Database is missing startup information.\r\n " + "Database is missing startup information.\r\n " +
"It is either damaged, tamped with or not a valid AyaNova database.\r\n" + "It is either damaged, tamped with or not a valid AyaNova database.\r\n" +
"(Note that a pre-release database can not be used with AyaNova)\r\n" + "(Note that a pre-release database can not be used with AyaNova)\r\n" +
"\r\n************************************************\r\n" ,ex "\r\n************************************************\r\n", ex
); );
#endif #endif
} }
finally finally
{ {
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 16";
dataReader.Close(); dataReader.Close();
} }
} }
} }
@@ -856,29 +879,53 @@ namespace GZTW.AyaNova.BLL
try try
{ {
Validate(false); //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 17";//this is the last logged line before 18 and then finally 18a
Validate(false);//this must be throwing an exception
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 17-A";//this doesn't log
if (_Valid == false) if (_Valid == false)
{
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 17-B";
throw new InvalidOperationException(); throw new InvalidOperationException();
}
} }
catch catch(Exception ex)
{ {
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 18";
_Valid = false; _Valid = false;
#if(FIPS_MODE)
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 18-A";
_LicenseValidationStatus += "\r\nValidate Exception:\r\n" + ex.Message;
_LicenseValidationStatus += "\r\nValidate Exception stack:\r\n" + ex.StackTrace;
throw new InvalidOperationException(
"**** A VALID AYANOVA LICENSE WAS NOT FOUND ***\r\n\r\n " +
"Diagnostic info:\r\n\r\n"+_LicenseValidationStatus);
#else
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 18-B";
//_LicenseValidationStatus
throw new InvalidOperationException( throw new InvalidOperationException(
"**** A VALID AYANOVA LICENSE WAS NOT FOUND ***\r\n\r\n " + "**** A VALID AYANOVA LICENSE WAS NOT FOUND ***\r\n\r\n " +
"The license key has been tampered with or damaged.\r\n\r\n" + "The license key has been tampered with or damaged.\r\n\r\n" +
"** License violations are logged for the protection of the licensee and licensor **\r\n\r\n" + "** License violations are logged for the protection of the licensee and licensor **\r\n\r\n" +
"Restore the database from a backup or contact AyaNova technical\r\n" + "Restore the database from a backup or contact AyaNova technical\r\n" +
"support for assistance."); "support for assistance.");
#endif
} }
#if(FIPS_MODE) #if(FIPS_MODE)
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 19";
//case 3378 //case 3378
if (bMustUpdate) if (bMustUpdate)
{ {
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 20";
DataPortal_Update(); DataPortal_Update();
} }
#endif #endif
//_LicenseValidationStatus += "\r\nDataPortal_Fetch: 21-FIN";
} }
@@ -908,7 +955,7 @@ namespace GZTW.AyaNova.BLL
//contains a signature that disallows editing, this is just //contains a signature that disallows editing, this is just
//to prevent casual users from bothering to try messing with it in the first place //to prevent casual users from bothering to try messing with it in the first place
//by seeing it when opening the db in a db admin tool //by seeing it when opening the db in a db admin tool
/*shaM.ComputeHash(enc.GetBytes("Who is John Galt?"))*/ /*shaM.ComputeHash(enc.GetBytes("Who is John Galt?"))*/
byte[] bkey = new byte[32] { 0xAE, 0x6E, 0x53, 0x24, 0xC6, 0x53, 0x1D, 0x88, 0x90, 0x12, 0x80, 0xCC, 0x19, 0x88, 0x71, 0x38, 0xA3, 0xBF, 0x63, 0x64, 0xCB, 0x0C, 0xED, 0x50, 0x47, 0xCA, 0x96, 0x8C, 0x27, 0xCD, 0xD2, 0x64 }; byte[] bkey = new byte[32] { 0xAE, 0x6E, 0x53, 0x24, 0xC6, 0x53, 0x1D, 0x88, 0x90, 0x12, 0x80, 0xCC, 0x19, 0x88, 0x71, 0x38, 0xA3, 0xBF, 0x63, 0x64, 0xCB, 0x0C, 0xED, 0x50, 0x47, 0xCA, 0x96, 0x8C, 0x27, 0xCD, 0xD2, 0x64 };
/*shaM.ComputeHash(enc.GetBytes("License IV"))*/ /*shaM.ComputeHash(enc.GetBytes("License IV"))*/
@@ -1033,7 +1080,7 @@ namespace GZTW.AyaNova.BLL
this._ScheduleableUsers = 0; this._ScheduleableUsers = 0;
this._SchemaVersion = 0; this._SchemaVersion = 0;
//this._status = "";
this._Expires = System.DateTime.Now; this._Expires = System.DateTime.Now;
//case 999 //case 999
@@ -1057,14 +1104,14 @@ namespace GZTW.AyaNova.BLL
private void Validate(bool CheckInstallableUntilDate) private void Validate(bool CheckInstallableUntilDate)
{ {
//_LicenseValidationStatus += "\r\nValidate: 1";
InValidate(); InValidate();
UTF8Encoding utf8 = new UTF8Encoding(); UTF8Encoding utf8 = new UTF8Encoding();
string Key = utf8.GetString(mbGlobalData); string Key = utf8.GetString(mbGlobalData);
// throw new System.NotSupportedException("TEST");
//case 1172 //case 1172
string sKeyType = "AyaNovaLiteLicenseKey"; string sKeyType = "AyaNovaLiteLicenseKey";
@@ -1079,14 +1126,16 @@ namespace GZTW.AyaNova.BLL
bool containsXML = Key.Contains("<?xml version=\"1.0\" encoding=\"utf-16\" standalone=\"yes\"?>"); bool containsXML = Key.Contains("<?xml version=\"1.0\" encoding=\"utf-16\" standalone=\"yes\"?>");
bool containsJSON = Key.Contains("[KEY"); bool containsJSON = Key.Contains("[KEY");
//_LicenseValidationStatus += "\r\nValidate: 2";
if (!containsXML && !containsJSON) if (!containsXML && !containsJSON)
{ {
_Valid = false; _Valid = false;
//_status = "Error: could not find license key in text provided"; _LicenseValidationStatus = "Error: could not find license key in text provided";
return; return;
} }
//_LicenseValidationStatus += "\r\nValidate: 3";
if (containsXML) if (containsXML)
{ {
@@ -1155,7 +1204,7 @@ namespace GZTW.AyaNova.BLL
{ {
_Valid = false; _Valid = false;
//log.Error("Internal error # 1002"); //log.Error("Internal error # 1002");
//_status="Error: exception in LoadXml:\r\n." + ex.Message + "\r\n" + ex.InnerException; //_LicenseValidationStatus="Error: exception in LoadXml:\r\n." + ex.Message + "\r\n" + ex.InnerException;
return; return;
} }
@@ -1174,7 +1223,7 @@ namespace GZTW.AyaNova.BLL
{ {
_Valid = false; _Valid = false;
//log.Error("Internal error # 1003"); //log.Error("Internal error # 1003");
//_status="Error: no signature found." + ex.Message + "\r\n" + ex.InnerException; //_LicenseValidationStatus="Error: no signature found." + ex.Message + "\r\n" + ex.InnerException;
return; return;
@@ -1185,7 +1234,7 @@ namespace GZTW.AyaNova.BLL
{ {
_Valid = false; _Valid = false;
//log.Error("Internal error # 1004"); //log.Error("Internal error # 1004");
//_status="Error: Signature not valid, key has been tampered with."; //_LicenseValidationStatus="Error: Signature not valid, key has been tampered with.";
return; return;
} }
@@ -1227,7 +1276,7 @@ namespace GZTW.AyaNova.BLL
_Installable = false; _Installable = false;
_Valid = false; _Valid = false;
//log.Error("Internal error # 1005"); //log.Error("Internal error # 1005");
//_status="Error: Installation key has expired."; //_LicenseValidationStatus="Error: Installation key has expired.";
//return; //return;
} }
@@ -1319,7 +1368,7 @@ namespace GZTW.AyaNova.BLL
{ {
_Valid = false; _Valid = false;
//log.Error("Internal error # 1006"); //log.Error("Internal error # 1006");
//_status="Error: Signature not valid - exception Processing fields:\r\n." + ex.Message + "\r\n" + ex.InnerException; //_LicenseValidationStatus="Error: Signature not valid - exception Processing fields:\r\n." + ex.Message + "\r\n" + ex.InnerException;
return; return;
} }
@@ -1327,6 +1376,7 @@ namespace GZTW.AyaNova.BLL
} }
else else
{ {
//_LicenseValidationStatus += "\r\nValidate: 4";
#region PARSE JSON KEY #region PARSE JSON KEY
string licenseFileData = Key; string licenseFileData = Key;
//extract between [KEY and KEY] //extract between [KEY and KEY]
@@ -1336,10 +1386,11 @@ namespace GZTW.AyaNova.BLL
!licenseFileData.Contains("SIGNATURE]")) !licenseFileData.Contains("SIGNATURE]"))
{ {
_Valid = false; _Valid = false;
//throw new System.FormatException("KEY IS NOT VALID! Missing one or more required delimiters"); //_LicenseValidationStatus = "KEY IS NOT VALID! Missing one or more required delimiters";
return; return;
} }
//_LicenseValidationStatus += "\r\nValidate: 5";
string keyNoWS = System.Text.RegularExpressions.Regex.Replace(AyaBizUtils.ExtractString(licenseFileData, "[KEY", "KEY]").Trim(), "(\"(?:[^\"\\\\]|\\\\.)*\")|\\s+", "$1"); string keyNoWS = System.Text.RegularExpressions.Regex.Replace(AyaBizUtils.ExtractString(licenseFileData, "[KEY", "KEY]").Trim(), "(\"(?:[^\"\\\\]|\\\\.)*\")|\\s+", "$1");
string keySig = AyaBizUtils.ExtractString(licenseFileData, "[SIGNATURE", "SIGNATURE]").Trim(); string keySig = AyaBizUtils.ExtractString(licenseFileData, "[SIGNATURE", "SIGNATURE]").Trim();
@@ -1368,12 +1419,12 @@ EQIDAQAB
if (!signer.VerifySignature(expectedSig)) if (!signer.VerifySignature(expectedSig))
{ {
_Valid = false; _Valid = false;
//_status = "Error: Signature not valid, key has been tampered with."; _LicenseValidationStatus = "Error: Signature not valid, key has been tampered with.";
return; return;
} }
#endregion check signature #endregion check signature
//_LicenseValidationStatus += "\r\nValidate: 6";
//valid key (has valid signature) //valid key (has valid signature)
_Valid = true; _Valid = true;
try try
@@ -1482,14 +1533,17 @@ EQIDAQAB
} }
} }
//_LicenseValidationStatus += "\r\nValidate: 7";
#endregion get values #endregion get values
} }
catch catch (Exception ex)
{ {
//_LicenseValidationStatus += "\r\nValidate: 8";
_Valid = false; _Valid = false;
// _status = "Error: Signature not valid - exception processing fields:\r\n." + ex.Message + "\r\n" + ex.InnerException; //_LicenseValidationStatus += "Error: Signature not valid - exception processing fields:\r\n." + ex.Message;
if (ex.InnerException != null)
//_LicenseValidationStatus += "\r\n" + ex.InnerException.Message;
return; return;
} }

View File

@@ -321,8 +321,14 @@ Namespace Security
'TODO: FIPS 'TODO: FIPS
'case 3378 'case 3378
'******************************************************************************
'FIPS MODE SETTING
'CAUTION, REMARK THIS CAREFULLY!!
'#Const FIPS_MODE = True '#Const FIPS_MODE = True
#Const FIPS_MODE = False #Const FIPS_MODE = False
''******************************************************************************
#If FIPS_MODE = True Then #If FIPS_MODE = True Then