8.9/jQuery
Deployed to azure as an app service on Linux-
Getting error: The time zone ID 'Central Standard Time' was not found on the local computer.
What do I need to do to make this go away and resolve?
It also changes the type from text to password -
If I change the name of the field, it doesn't do it.
Does opening a model trigger something that changes any input named password to type password, then encrypt it, for security reasons?
This is related to https://support.aspnetzero.com/QA/Questions/9441/Cannot-Complete-Authentication-After-Chrome-Windows-Update--Local-State-File-Data-Conflict-in-Windows-User-App-Data
This is 8.9, JQ
The issue is with Chrome 84.0.4147.105 in my case, multiple users.
No modifications to any of the authentication code and everything works great, except for some users that use this version of Chrome. Testing in production, we created a new Tenant, and he is unable to login.
I've been able to recreate this in development environment by adding my domain, and his tenant name + my domain to my hosts file, modifying IIS express configuration to listen on port 80, and pointing my dev environment at the production database. Lastly, I took the Local State file for the user and copied that to my Chrome profile.
User logs in - it posts and redirects to /App
Which immediately redirects back to login.
In the IIS logs:
INFO 2020-07-31 22:26:26,118 [10 ] Microsoft.AspNetCore.Hosting.Diagnostics - Request starting HTTP/1.1 GET http://{Tenant}.{My Domain}/App
INFO 2020-07-31 22:26:26,127 [10 ] uthorization.DefaultAuthorizationService - Authorization failed.
INFO 2020-07-31 22:26:26,129 [10 ] tion.Cookies.CookieAuthenticationHandler - AuthenticationScheme: Identity.Application was challenged.
In my instance, no users for my new tenant are able to login with Chrome if they've logged in before it was updated,
The only resolution it have them remove the Local State file from the browser profile folder in app data.
I have my site deployed to Azure (linux) and am not using SSL at the moment, we're not live yet.
The current AZURE documentation is outdated.
I'm trying to figure out how to setup web app + sql and it's all different now.
I have a mix of tenants, and I'd like to make two factor optional per tenant.
Is there a way to do this at host level, then override it at tenant level, allowing the "enable two factor" by disabling the override?
What would be the best approach to accomplish this?
8.9 Core / jQuery
I have a background job that runs for all tenants and sends an email to them.
When it tries to notify i get the error Must set LocalizationSourceName before...
I need to not only resolve this - but as I go through tenants, get their localization setting.
My worker class is basedon PeriodicBackgroundWorkerBase.
To send the email, it calls a method in a different class - my own emailer class, which inherits from workServiceBase, IUserEmailer, ITransientDependency
Thus, two questions -
1- How can I use localization in a class based on PeriodicBackgroundWorkerBase
and
2- Since I'm calling a function for different tenants, how do I change localization for each tenant as I go through them?
Thanks!
8.9/ jQuery
If I have repositories I wish to join, and still leverage WhereIf for filtering, what's the ANZ way?
For example:
Suppose we have this:
var query = _lookup_employeeRepository.GetAll().WhereIf(
!string.IsNullOrWhiteSpace(input.Filter),
e=> e.email != null && e.email.Contains(input.Filter)
);
And what I want to do is something like this:
var query = from e in _lookup_employeeRepository.GetAll()
join ed in _employeeDepartmentRepository.GetAll() on e.Id equals ed.EmployeeId
join du in _departmentUserRepository.GetAll() on ed.DepartmentId equals du.DepartmentId
where e.TenantId == tId && du.UserId == uId && (e.firstName.Contains(input.Filter) || e.lastName.Contains(input.Filter))
select e;
However - instead of doing it that way, use the WhereIf for filtering..
So I reviewed this: https://docs.microsoft.com/en-us/dotnet/api/system.linq.enumerable.join?view=netcore-3.1
So I'd like to use Whereif, so my query would look something like:
var query2 = _lookup_employeeRepository.GetAll()
.Join(_employeeDepartmentRepository.GetAll(), Id => EmployeeId, ) // <----- How do I do this?
.WhereIf(
!string.IsNullOrWhiteSpace(input.Filter), e =>
e.firstName.Contains(input.Filter) || e.lastName.Contains(input.Filter)
);
Do I have to take the tables .toList() first? If so, I'll do it as per my second example in this (using from e in ...)
What's the reason to use hangfire?
It seems very robust, but I'm not grasping why one would want to use hangfaire over the existing job engine in ABP.
One benefit I see is that it's database driven, so could be run on a different server than the web server - but it seems the existing job engine could be used in the same manner.
I'm just trying to understand what the rationale is to use handfire.
Does it benefit web app performance in some way, because of its threading?
8.9/jq
So I'm working on a filter where the user picks filtered elements from a modal.
The modal pops up, the user selects the items and it successfully closes.
In the filter JS, I successfully receive the array of objects selected.
For the datatable in the view, I'm not using ajas, but using an array of objects as the source.
In the below code - the datatable successfully renders my dataSet. It correctly displays name.
However - when I push my new objects to the dataset, the dataTable never refreshes.
How do I accomplish this? I've reviewed the datatables documentation; and tried various methods.. I can't call init() again. Draw doesn't update, either.
Any ideas?
This is the code for my filter:
var departments = {
$table: $('#FilterDepartmentsTable'),
$emptyInfo: $('#FilterDepartmentsEmptyInfo'),
dataTable: null,
dataSet: [{ name: "New Dept", value: "24839158-39b6-4989-14a5-08d8180d94ac" }],
add: function (departmentList) {
var departmentIds = _.pluck(departmentList, "value");
debugger;
for (var i = 0; i < departmentList.length; i++) {
this.dataSet.push(departmentList[i]);
}
this.dataTable.draw();
debugger;
},
remove: function (department) {
var empId = thisEmp.empId();
if (!empId) {
return;
}
abp.message.confirm(
app.localize('RemoveDepartmentFromFilter',
department.Name,
thisEmp.displayName()),
app.localize('AreYouSure'),
function (isConfirmed) {
if (isConfirmed) {
debugger;
}
}
);
},
openAddModal: function () {
_addDepartmentModal.open({
title: app.localize('SelectADepartment')
},
function (selectedItems) {
departments.add(selectedItems);
});
},
init: function () {
console.log("departments init()");
this.dataTable = departments.$table.find('.filter-departments-table').DataTable({
data: this.dataSet,
paging: true,
serverSide: false,
processing: false,
//deferLoading: 0, //prevents table for ajax request on initialize
responsive: false,
columnDefs: [
{
targets: 0,
data: null,
orderable: false,
defaultContent: '',
className: 'text-center',
rowAction: {
targets: 0,
data: null,
orderable: false,
defaultContent: '',
element: $("<button/>")
.addClass("btn btn-outline-danger btn-icon btn-sm")
.attr("title", app.localize('Delete'))
.append($("<i/>").addClass("la la-times")).click(function () {
var record = $(this).data();
departments.remove(record);
})
}
},
{
targets: 1,
data: 'name'
},
]
});
this.dataTable.on('draw', function (e, settings, json, xhr) {
console.log("DRAW table says... " + e.target.rows.length + " departments");
});
}
};
I'm not using it, just the regular job manager; but I'm concerned my job won't run in the background if there's no activity on the site.
Anyone have any suggestions?