diff --git a/AyaNovaSolution.sln b/AyaNovaSolution.sln
index 061172b..9192978 100644
--- a/AyaNovaSolution.sln
+++ b/AyaNovaSolution.sln
@@ -468,8 +468,8 @@ Global
{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.Build.0 = Release|Any CPU
- {3EF693E1-F60E-4D0F-929C-CBF8BEF96F12}.Release|Any CPU.ActiveCfg = Release|x86
- {3EF693E1-F60E-4D0F-929C-CBF8BEF96F12}.Release|Any CPU.Build.0 = 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|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|WBI.ActiveCfg = Release|Any CPU
@@ -1074,6 +1074,7 @@ Global
{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|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|Mixed Platforms.ActiveCfg = Debug|x86
{5407E64B-951B-414D-B532-4AF2EDBDD9FD}.Debug|Mixed Platforms.Build.0 = Debug|x86
diff --git a/release procedure.txt b/release procedure.txt
index 21ca78d..40437d8 100644
--- a/release procedure.txt
+++ b/release procedure.txt
@@ -9,7 +9,7 @@ Release procedure as of 6/15/17
6 Build AyaNova.exe project only watch for errors
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
-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
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
$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
diff --git a/source/MBI/Properties/PublishProfiles/PublishMBI.pubxml.user b/source/MBI/Properties/PublishProfiles/PublishMBI.pubxml.user
index 11a7a0d..35a9170 100644
--- a/source/MBI/Properties/PublishProfiles/PublishMBI.pubxml.user
+++ b/source/MBI/Properties/PublishProfiles/PublishMBI.pubxml.user
@@ -13,7 +13,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
07/02/2018 11:40:56
- 08/22/2018 16:48:02
+ 09/13/2018 15:49:49
06/14/2017 11:29:54
@@ -34,37 +34,37 @@ by editing this MSBuild file. In order to learn more about this please visit htt
07/02/2018 11:40:10
- 08/22/2018 16:48:02
+ 09/13/2018 15:49:49
- 08/22/2018 16:48:02
+ 09/13/2018 15:49:49
- 07/02/2018 11:48:47
+ 09/13/2018 13:53:00
- 08/22/2018 16:46:15
+ 09/13/2018 15:47:39
- 07/02/2018 11:48:49
+ 09/13/2018 13:53:02
- 08/22/2018 16:48:02
+ 09/13/2018 15:49:49
07/02/2018 11:40:09
- 08/22/2018 16:47:06
+ 09/13/2018 15:48:54
- 08/22/2018 16:47:48
+ 09/13/2018 15:49:35
- 08/22/2018 16:48:02
+ 09/13/2018 15:49:49
- 07/02/2018 11:48:49
+ 09/13/2018 13:53:02
06/14/2017 12:04:42
@@ -73,58 +73,58 @@ by editing this MSBuild file. In order to learn more about this please visit htt
06/14/2017 11:32:19
- 07/02/2018 11:48:47
+ 09/13/2018 13:53:00
- 08/22/2018 16:48:02
+ 09/13/2018 15:49:49
- 08/22/2018 16:48:02
+ 09/13/2018 15:49:49
- 08/22/2018 16:48:02
+ 09/13/2018 15:49:49
07/02/2018 12:33:05
- 08/22/2018 16:48:02
+ 09/13/2018 15:49:49
- 08/22/2018 16:48:02
+ 09/13/2018 15:49:49
- 08/22/2018 16:48:02
+ 09/13/2018 15:49:49
- 08/22/2018 16:48:02
+ 09/13/2018 15:49:49
- 08/22/2018 16:48:02
+ 09/13/2018 15:49:49
- 08/22/2018 16:47:53
+ 09/13/2018 15:49:39
- 08/22/2018 16:47:53
+ 09/13/2018 15:49:39
- 08/22/2018 16:47:53
+ 09/13/2018 15:49:39
07/02/2018 11:40:56
- 08/22/2018 16:47:53
+ 09/13/2018 15:49:39
07/02/2018 11:40:55
- 08/22/2018 16:47:53
+ 09/13/2018 15:49:39
- 08/22/2018 16:47:53
+ 09/13/2018 15:49:39
07/02/2018 11:40:55
@@ -133,25 +133,25 @@ by editing this MSBuild file. In order to learn more about this please visit htt
07/02/2018 11:40:55
- 08/22/2018 16:47:49
+ 09/13/2018 15:49:36
- 08/22/2018 16:47:53
+ 09/13/2018 15:49:39
- 08/22/2018 16:47:53
+ 09/13/2018 15:49:39
- 08/22/2018 16:47:53
+ 09/13/2018 15:49:39
07/02/2018 11:40:56
- 08/22/2018 16:47:53
+ 09/13/2018 15:49:39
- 08/22/2018 16:47:53
+ 09/13/2018 15:49:39
07/02/2018 11:40:56
diff --git a/source/Plugins/AyaNova.Plugin.QBOI/Properties/AssemblyInfo.cs b/source/Plugins/AyaNova.Plugin.QBOI/Properties/AssemblyInfo.cs
index ec0c0f8..790429c 100644
--- a/source/Plugins/AyaNova.Plugin.QBOI/Properties/AssemblyInfo.cs
+++ b/source/Plugins/AyaNova.Plugin.QBOI/Properties/AssemblyInfo.cs
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Ground Zero Tech-Works Inc.")]
[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: AssemblyCulture("")]
@@ -33,4 +33,4 @@ using System.Runtime.InteropServices;
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.5.0.0")]
-[assembly: AssemblyFileVersion("7.5.3.0")]
+[assembly: AssemblyFileVersion("7.5.4.0")]
diff --git a/source/Plugins/AyaNova.Plugin.QBOI/QBOI.cs b/source/Plugins/AyaNova.Plugin.QBOI/QBOI.cs
index 1194899..0a00182 100644
--- a/source/Plugins/AyaNova.Plugin.QBOI/QBOI.cs
+++ b/source/Plugins/AyaNova.Plugin.QBOI/QBOI.cs
@@ -59,7 +59,7 @@ namespace AyaNova.PlugIn.QBOI
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
diff --git a/source/Plugins/AyaNova.Plugin.QBOI/Util.cs b/source/Plugins/AyaNova.Plugin.QBOI/Util.cs
index c661edb..a6ae6ad 100644
--- a/source/Plugins/AyaNova.Plugin.QBOI/Util.cs
+++ b/source/Plugins/AyaNova.Plugin.QBOI/Util.cs
@@ -399,8 +399,12 @@ namespace AyaNova.PlugIn.QBOI
///
public static pfstat PreFlightCheck()
{
+ IntegrationLog.Log(QBID, "PFC: start");
if (!_AuthenticationCompleted)
+ {
+ IntegrationLog.Log(QBID, "PFC: Authenticating...");
StartAuthorization();
+ }
while (!_AuthenticationCompleted)
{
@@ -408,6 +412,8 @@ namespace AyaNova.PlugIn.QBOI
//TODO: add timeout here
}
+ IntegrationLog.Log(QBID, "PFC: Authentication completed, validating company data");
+
if (QBValidate() == pfstat.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();
if (ValidateSettings(false) == pfstat.Cancel)
@@ -430,6 +438,7 @@ namespace AyaNova.PlugIn.QBOI
return pfstat.Cancel;
}
+ IntegrationLog.Log(QBID, "PFC: Checking cached mappings for validity...");
//Added: 18-Nov-2006 CASE 163
//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;
}
@@ -600,6 +611,47 @@ namespace AyaNova.PlugIn.QBOI
///
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:
@@ -667,6 +719,10 @@ KEY: AssignedTime, VALUE: 12/08/2017 18:52:04
//case 3520
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
//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
diff --git a/source/WinFormApp/About.cs b/source/WinFormApp/About.cs
index e2a09ea..879c9f4 100644
--- a/source/WinFormApp/About.cs
+++ b/source/WinFormApp/About.cs
@@ -169,6 +169,9 @@ namespace AyaNova
private void copyExtendedSupportInfoToClipboardToolStripMenuItem_Click(object sender, EventArgs e)
{
+ //case 3663
+ Util.LogFullSupportInfoToFile();
+
StringBuilder sbInfo = new StringBuilder();
string currentAssemblyDirectoryName = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
//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");
diff --git a/source/WinFormApp/AssemblyInfo.cs b/source/WinFormApp/AssemblyInfo.cs
index 8ecac21..b8c1e54 100644
--- a/source/WinFormApp/AssemblyInfo.cs
+++ b/source/WinFormApp/AssemblyInfo.cs
@@ -62,4 +62,4 @@ using System.Runtime.InteropServices;
[assembly: log4net.Config.XmlConfigurator(ConfigFile="Log4Net.config",Watch=true)]
//[assembly: log4net.Config.XmlConfigurator(Watch=true)]
[assembly: ComVisibleAttribute(false)]
-[assembly: AssemblyFileVersionAttribute("7.5.8.0")]
+[assembly: AssemblyFileVersionAttribute("7.5.9.0")]
diff --git a/source/WinFormApp/AyaNova.csproj b/source/WinFormApp/AyaNova.csproj
index 77e9a00..6dbab2f 100644
--- a/source/WinFormApp/AyaNova.csproj
+++ b/source/WinFormApp/AyaNova.csproj
@@ -1353,6 +1353,7 @@
+ Always
diff --git a/source/WinFormApp/Log4Net.config b/source/WinFormApp/Log4Net.config
index 7e713e8..9c71bab 100644
--- a/source/WinFormApp/Log4Net.config
+++ b/source/WinFormApp/Log4Net.config
@@ -15,7 +15,7 @@
-
+
diff --git a/source/WinFormApp/Util.cs b/source/WinFormApp/Util.cs
index 428fbee..3c8b044 100644
--- a/source/WinFormApp/Util.cs
+++ b/source/WinFormApp/Util.cs
@@ -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();
}
+
+ //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()
{
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
sb.Append(AyaBizUtils.SubVersion);
-
+
+
// sb.Append("Options:\r\n");
// sb.Append(AyaBizUtils.View());
diff --git a/source/WinFormApp/bin/Debug/Log4Net.config b/source/WinFormApp/bin/Debug/Log4Net.config
index 7e713e8..9c71bab 100644
--- a/source/WinFormApp/bin/Debug/Log4Net.config
+++ b/source/WinFormApp/bin/Debug/Log4Net.config
@@ -15,7 +15,7 @@
-
+
diff --git a/source/bizobjects/AyaLib/AssemblyInfo.cs b/source/bizobjects/AyaLib/AssemblyInfo.cs
index 51761e8..ec59b44 100644
--- a/source/bizobjects/AyaLib/AssemblyInfo.cs
+++ b/source/bizobjects/AyaLib/AssemblyInfo.cs
@@ -64,4 +64,4 @@ using System.Security.Permissions;
// 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: AssemblyFileVersionAttribute("7.5.8.0")]
+[assembly: AssemblyFileVersionAttribute("7.5.9.0")]
diff --git a/source/bizobjects/AyaLib/GZTW.AyaNova.BLL.csproj b/source/bizobjects/AyaLib/GZTW.AyaNova.BLL.csproj
index 47728c7..a02ea68 100644
--- a/source/bizobjects/AyaLib/GZTW.AyaNova.BLL.csproj
+++ b/source/bizobjects/AyaLib/GZTW.AyaNova.BLL.csproj
@@ -158,8 +158,8 @@
True
- ..\..\..\packages\Newtonsoft.Json.5.0.4\lib\net40\Newtonsoft.Json.dll
- True
+ False
+ ..\..\..\3rdprtylibs\json.net.40\Newtonsoft.Json.dll
System
@@ -293,11 +293,15 @@
+
Code
+
+ Code
+
@@ -508,9 +512,6 @@
Code
-
- Code
-
Code
diff --git a/source/bizobjects/AyaLib/GZTW.AyaNova.BLL/GlobalEx.cs b/source/bizobjects/AyaLib/GZTW.AyaNova.BLL/GlobalEx.cs
index 6e56db5..2fe4097 100644
--- a/source/bizobjects/AyaLib/GZTW.AyaNova.BLL/GlobalEx.cs
+++ b/source/bizobjects/AyaLib/GZTW.AyaNova.BLL/GlobalEx.cs
@@ -77,7 +77,7 @@ namespace GZTW.AyaNova.BLL
//Case 508
private string _DigestValue;
- // private string _status;
+ private string _LicenseValidationStatus;
private DateTime _Generated;
private DateTime _InstallableUntil;
private bool _Installable;
@@ -337,7 +337,7 @@ namespace GZTW.AyaNova.BLL
//{
// get
// {
- // return _status;
+ // return _LicenseValidationStatus;
// }
//}
@@ -691,44 +691,56 @@ namespace GZTW.AyaNova.BLL
///
protected override void DataPortal_Fetch(object Criteria)
{
+ this._LicenseValidationStatus = "";
//Fetching license key
//sets all settings to safe mode before fetch and validate
InValidate();
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 2";
+
+
Criteria crit = (Criteria)Criteria;
#if(FIPS_MODE)
//case 3378
bool bMustUpdate = false;//if it has to decrypt the key and ex data then it should save it back immediately here
#endif
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 3";
using (SafeDataReader dataReader = DBUtil.GetReaderFromSQLString("SELECT * FROM aGlobalEx"))
{
-
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 4";
if (dataReader.Read())
{
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 5";
try
{
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 6";
//schema version
mDBSchema = dataReader.GetInt32("aDBSchema");
//Global data
int nTempsize = dataReader.GetInt32("aGlobalDataSize");
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 7";
if (nTempsize > 0)
{
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 8";
byte[] temp = new Byte[nTempsize];
dataReader.GetBytes("aGlobalData", 0, temp, 0, nTempsize);
#if(FIPS_MODE)
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 9";
//case 3378
string sKey = new UTF8Encoding().GetString(temp);
if (sKey.Contains("LicenseKey"))
{ //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
mbGlobalData = temp;
}
else
{
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 9-PathB";
//trigger a save after all is decrypted
bMustUpdate = true;
/*shaM.ComputeHash(enc.GetBytes("Who is John Galt?"))*/
@@ -742,7 +754,7 @@ namespace GZTW.AyaNova.BLL
}
#else
-
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 9-PathC";
/*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 };
/*shaM.ComputeHash(enc.GetBytes("License IV"))*/
@@ -756,7 +768,7 @@ namespace GZTW.AyaNova.BLL
else
throw new InvalidOperationException();
-
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 10";
//Global data EX
nTempsize = dataReader.GetInt32("aGlobalDataExSize");
@@ -764,16 +776,18 @@ namespace GZTW.AyaNova.BLL
if (nTempsize > 0)
{
-
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 11";
//Get the data...
byte[] temp = new Byte[nTempsize];
dataReader.GetBytes("aGlobalDataEx", 0, temp, 0, nTempsize);
-
+
//Into a memory stream...
MemoryStream mstream = null;
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 12";
#if(FIPS_MODE)
if (!_FIPS_READY)
{
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 12-A";
//Decrypt the data...
UTF8Encoding enc = new UTF8Encoding();
//SHA256 shaM = new SHA256Managed();
@@ -787,11 +801,13 @@ namespace GZTW.AyaNova.BLL
}
else
{
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 12-B";
//already fips ready (decrypted in db) so just process it
mstream = new MemoryStream(temp);
}
#else
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 12-C";
//Decrypt the data...
UTF8Encoding enc = new UTF8Encoding();
//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 };
CipherWrapper c = new CipherWrapper(bkey);
- mstream = new MemoryStream(c.DecryptMessage(temp, biv));
+ mstream = new MemoryStream(c.DecryptMessage(temp, biv));
#endif
-
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 13";
//De-serialize it into the AGlobalExData object...
BinaryFormatter bformatter = new BinaryFormatter();
bformatter.AssemblyFormat = System.Runtime.Serialization.Formatters.FormatterAssemblyStyle.Simple;
try
{
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 13-A";
_AGlobalExData = (AGlobalExData)bformatter.Deserialize(mstream);
}
catch
{
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 13-B";
_AGlobalExData = new AGlobalExData();
_AGlobalExData.EvalExpire = System.DateTime.Now;
_AGlobalExData.EvalAdvanceReference = System.DateTime.Now;
@@ -822,9 +840,13 @@ namespace GZTW.AyaNova.BLL
else
throw new InvalidOperationException();
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 14";
+
}
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
//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
@@ -832,21 +854,22 @@ namespace GZTW.AyaNova.BLL
//string s=ex.Message;
#else
- throw new System.ApplicationException(
- "\r\n************************************************\r\n" +
- "Database is missing startup information.\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" +
- "\r\n************************************************\r\n" ,ex
- );
+ throw new System.ApplicationException(
+ "\r\n************************************************\r\n" +
+ "Database is missing startup information.\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" +
+ "\r\n************************************************\r\n", ex
+ );
#endif
}
finally
{
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 16";
dataReader.Close();
}
-
+
}
}
@@ -856,29 +879,53 @@ namespace GZTW.AyaNova.BLL
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)
+ {
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 17-B";
throw new InvalidOperationException();
+ }
}
- catch
+ catch(Exception ex)
{
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 18";
_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(
"**** A VALID AYANOVA LICENSE WAS NOT FOUND ***\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" +
"Restore the database from a backup or contact AyaNova technical\r\n" +
"support for assistance.");
+#endif
}
#if(FIPS_MODE)
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 19";
//case 3378
if (bMustUpdate)
{
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 20";
DataPortal_Update();
}
#endif
+ //_LicenseValidationStatus += "\r\nDataPortal_Fetch: 21-FIN";
}
@@ -908,7 +955,7 @@ namespace GZTW.AyaNova.BLL
//contains a signature that disallows editing, this is just
//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
-
+
/*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 };
/*shaM.ComputeHash(enc.GetBytes("License IV"))*/
@@ -1033,7 +1080,7 @@ namespace GZTW.AyaNova.BLL
this._ScheduleableUsers = 0;
this._SchemaVersion = 0;
- //this._status = "";
+
this._Expires = System.DateTime.Now;
//case 999
@@ -1057,14 +1104,14 @@ namespace GZTW.AyaNova.BLL
private void Validate(bool CheckInstallableUntilDate)
{
-
+ //_LicenseValidationStatus += "\r\nValidate: 1";
InValidate();
UTF8Encoding utf8 = new UTF8Encoding();
string Key = utf8.GetString(mbGlobalData);
-
+ // throw new System.NotSupportedException("TEST");
//case 1172
string sKeyType = "AyaNovaLiteLicenseKey";
@@ -1079,14 +1126,16 @@ namespace GZTW.AyaNova.BLL
bool containsXML = Key.Contains("");
bool containsJSON = Key.Contains("[KEY");
+ //_LicenseValidationStatus += "\r\nValidate: 2";
if (!containsXML && !containsJSON)
{
_Valid = false;
- //_status = "Error: could not find license key in text provided";
+ _LicenseValidationStatus = "Error: could not find license key in text provided";
return;
}
+ //_LicenseValidationStatus += "\r\nValidate: 3";
if (containsXML)
{
@@ -1155,7 +1204,7 @@ namespace GZTW.AyaNova.BLL
{
_Valid = false;
//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;
}
@@ -1174,7 +1223,7 @@ namespace GZTW.AyaNova.BLL
{
_Valid = false;
//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;
@@ -1185,7 +1234,7 @@ namespace GZTW.AyaNova.BLL
{
_Valid = false;
//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;
}
@@ -1227,7 +1276,7 @@ namespace GZTW.AyaNova.BLL
_Installable = false;
_Valid = false;
//log.Error("Internal error # 1005");
- //_status="Error: Installation key has expired.";
+ //_LicenseValidationStatus="Error: Installation key has expired.";
//return;
}
@@ -1319,7 +1368,7 @@ namespace GZTW.AyaNova.BLL
{
_Valid = false;
//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;
}
@@ -1327,6 +1376,7 @@ namespace GZTW.AyaNova.BLL
}
else
{
+ //_LicenseValidationStatus += "\r\nValidate: 4";
#region PARSE JSON KEY
string licenseFileData = Key;
//extract between [KEY and KEY]
@@ -1336,10 +1386,11 @@ namespace GZTW.AyaNova.BLL
!licenseFileData.Contains("SIGNATURE]"))
{
_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;
}
+ //_LicenseValidationStatus += "\r\nValidate: 5";
string keyNoWS = System.Text.RegularExpressions.Regex.Replace(AyaBizUtils.ExtractString(licenseFileData, "[KEY", "KEY]").Trim(), "(\"(?:[^\"\\\\]|\\\\.)*\")|\\s+", "$1");
string keySig = AyaBizUtils.ExtractString(licenseFileData, "[SIGNATURE", "SIGNATURE]").Trim();
@@ -1368,12 +1419,12 @@ EQIDAQAB
if (!signer.VerifySignature(expectedSig))
{
_Valid = false;
- //_status = "Error: Signature not valid, key has been tampered with.";
+ _LicenseValidationStatus = "Error: Signature not valid, key has been tampered with.";
return;
}
#endregion check signature
-
+ //_LicenseValidationStatus += "\r\nValidate: 6";
//valid key (has valid signature)
_Valid = true;
try
@@ -1482,14 +1533,17 @@ EQIDAQAB
}
}
-
+ //_LicenseValidationStatus += "\r\nValidate: 7";
#endregion get values
}
- catch
+ catch (Exception ex)
{
+ //_LicenseValidationStatus += "\r\nValidate: 8";
_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;
}
diff --git a/source/csla10/CSLA/BusinessIdentity.vb b/source/csla10/CSLA/BusinessIdentity.vb
index 2abadb5..183ca79 100644
--- a/source/csla10/CSLA/BusinessIdentity.vb
+++ b/source/csla10/CSLA/BusinessIdentity.vb
@@ -321,8 +321,14 @@ Namespace Security
'TODO: FIPS
'case 3378
+
+ '******************************************************************************
+ 'FIPS MODE SETTING
+ 'CAUTION, REMARK THIS CAREFULLY!!
'#Const FIPS_MODE = True
#Const FIPS_MODE = False
+ ''******************************************************************************
+
#If FIPS_MODE = True Then