Hello Dears,
please help me that I am new to the AX dynamics application we have an ASP.NET application and it is connected to the AX dynamics application every 90 days ASP.NET application is throwing Licence is Expired, please contact with Developer.
I check in the login.aspx.cs file and i found the following code.
private Boolean AuthenticateLicenes()
{
//Befor Login
BLLAXParamters bllpara = new BLLAXParamters();
PAYPARAMETER para = new PAYPARAMETER();
para = bllpara.GetParameter();
CommonMethods.SetCacheData("SettingPAYPARAMETER", para);
try
{
string install = CommonMethods.Decrypt(para.INSTALLESSDATE, "root@123");
if (install == null)
{
throw new Exception("");
}
string dt = install.Substring(0, 10);
string period = install.Substring(10, install.Length - 10);
DateTime result = DateTime.ParseExact(dt, "dd/MM/yyyy", CultureInfo.InvariantCulture);
TimeSpan difference = result - DateTime.Now;
int diffDay = Convert.ToInt16(Math.Abs(Math.Floor(Math.Abs(difference.TotalDays))));
if (diffDay > Convert.ToInt16(period))
{
throw new Exception("");
}
return true;
}
catch (Exception ex)
{
MessageBox messageBox = new MessageBox();
messageBox.MessageTitle = "Error";
messageBox.MessageText = "The License Is Expired , Please Connect With Developers";
Literal1.Text = messageBox.Show(this);
using (AXDataContext dc = new AXDataContext(ESSDB.connectionstringAX))
{
if (para != null)
{
para.INSTALLESSDATE = null;
dc.SubmitChanges();
}
}
return false;
}
return false;
}
Please help me how to resolve the issue. Thanks in Advance.