Now that .NET Core 3.0 has a release date of 23/09/2019, do you have plans to move over to this as it's just over 4 weeks away?
When I first started using ASP.Net Zero just over a year ago the "Session timeout & lock screen" was shown on the roadmap.
Since then I've been waiting for you to include the feature in ASP.Net Zero and was wondering when this might happen?
Is there an explanation for the new "Entity History" checkbox that appears in the latest Rad tool?
APOLOGIES - THIS IS A DUPLICATE. CANNOT SEEM TO DELETE SO WILL CLOSE IT.
When using the Rad Tool, I've noticed a new option has appeared.
There is a box titled Auditing which contains a checkbox called "Entity History"
I cannot seem to find any documentation for this. Could you give an explanation of exactly what it does or point me towards some documentation?
Many thanks.
I'm using the ASP Net Zero Tools to generate my ViewModels etc.
I prefer to use strongly typed TagHelpers, so I convert a lot of the generated form inputs to TagHelpers. All works as expected except for the Validation.
For example, the Zero Tools creates a ViewModel called CreateOrEditClientCaseModalViewModel.
public class CreateOrEditClientCaseModalViewModel
{
public CreateOrEditClientCaseDto ClientCase { get; set; }
public string ClientName { get; set;}
public bool IsEditMode => ClientCase.Id.HasValue;
}
To bind to data in my Dto I want to use the following standard approach
@Html.TextBoxFor(m => m.ClientCase.ClientName)
However, if this is a required field the Validation will reject it with the following message "The ClientName is a required field" so it's obviously looking for "ClientName " and not "ClientCase.ClientName" or "ClientCase_ClientName".
It seems that the Validation is taking place against the Dto and not the ViewModel.
So my question is, how do I change it to get the Validation to use the ViewModel and not the Dto?
I'm using the Core MVC and jQuery with Telerik Controls.
All controls are working well except for the MultiSelect. It must be bound to a String array to pass the selected values to the control.
public string[] CaseConditionsArray { get; set; }
I can successfully pass the previously selected values to the control and they display correctly. I can also add or remove additional items from the selected list.
My problem occurs when I need to save the data. I get a validation popup message "Your request is not valid!" "The following errors were detected during validation - ". However, nothing is listed.
In the Logs.txt the following errors are logged
WARN 2018-07-12 00:38:58,739 [39 ] Mvc.ExceptionHandling.AbpExceptionFilter - Method arguments are not valid! See ValidationErrors for details.
Abp.Runtime.Validation.AbpValidationException: Method arguments are not valid! See ValidationErrors for details.
at Abp.Runtime.Validation.Interception.MethodInvocationValidator.ThrowValidationError()
at Abp.Runtime.Validation.Interception.MethodInvocationValidator.Validate()
at Abp.AspNetCore.Mvc.Validation.AbpValidationActionFilter.<OnActionExecutionAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextActionFilterAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeInnerFilterAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextExceptionFilterAsync>d__23.MoveNext()
WARN 2018-07-12 00:38:58,740 [39 ] Mvc.ExceptionHandling.AbpExceptionFilter - There are 1 validation errors:
WARN 2018-07-12 00:38:58,740 [39 ] Mvc.ExceptionHandling.AbpExceptionFilter - (caseConditionsArray)
INFO 2018-07-12 00:38:58,748 [39 ] etCore.Mvc.Internal.ObjectResultExecutor - Executing ObjectResult, writing value Microsoft.AspNetCore.Mvc.ControllerContext.
INFO 2018-07-12 00:38:58,750 [39 ] ore.Mvc.Internal.ControllerActionInvoker - Executed action DpmsCloud.DpmsClientCases.DpmsClientCasesAppService.CreateOrEdit (DpmsCloud.Application) in 321.2847ms
INFO 2018-07-12 00:38:58,754 [39 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 334.6294ms 400 application/json; charset=utf-8
I don't have any issues with any other controls. I'm wondering if the problem is caused by the Multiselect requiring a string array rather than a simple string, int or datetime like the other controls.
Do you have any suggestions how to fix this issue?
I've generated a number of views with the Rad Tool and I'm using it as a quick way to get started.
I'm then replacing the Rad Tool generated Controls with Telerik UI Core controls and it has worked well except for the validation aspect.
I've tried to replace the Abp validation with Telerik/Kendo validation and replaced the generated code with a Telerik/ Kendo equivalent.
this.save = function () {
var validator = _$dpmsActivityInformationForm.data("kendoValidator");
if (!validator.validate()) {
return;
}
An example of my Telerik/Kendo controls is shown below and follows a more traditional MVC approach than the Rad Tool generated code.
<div class="form-group">
<div class="editor-label">
<label asp-for="DpmsActivity.StartDate"></label>
</div>
@(Html.Kendo().DateTimePickerFor(o => o.DpmsActivity.StartDate)
.HtmlAttributes(new { style = "width:100%", @class = "form-control" })
)
@Html.ValidationMessageFor(m => m.DpmsActivity.StartDate)
</div>
As you can see my ViewModel has a hierarchy which is basically Model.DpmsActivity.StartDate etc.
All of my Client side validation seems to work well but when I go to save I get an error message "Your request is not valid!" as shown in the attachment. It says that fields are required even when they have been filled out! I'm not sure if this error message is generated client side or server side.
I'm wondering if this error message can simply be switched off or something can be done to get it to recognize the correct fields. When the fields were generated by the Rad Tool I noticed they were in the format of "startDate" rather than "DpmsActivity.StartDate" and I'm wondering if that is the issue. However, I don't know how to get it to look for "DpmsActivity.StartDate" instead.
I'm really pleased with the way the Telerik/Kendo client side validation is working, so I just want the error message that's shown in the attachment to either work correctly with "DpmsActivity.StartDate" etc or to be disabled.
I need to change the standard behavior of _CreateOrEditModal.js for one of my Entities. Normally when saving, the modalManager closes the modal form and refreshes the underlying list. Instead I want to redirect to a different page and pass the Id of the newly created item.
However, I'm not sure how to obtain the new Id which in this case is a Guid. Using the example below I can easily access all of other fields from xyzClient, but not the Id which makes sense as it hasn't been generated at this point.
As I'm fairly new to Boilerplate/Zero, does anyone have any guidance how to get the new Id?
this.save = function () {
if (!_$xyzClientInformationForm.valid()) {
return;
}
var xyzClient = _$xyzClientInformationForm.serializeFormToObject();
_modalManager.setBusy(true);
_xyzClientsService.createOrEdit(
xyzClient
).done(function () {
abp.notify.info(app.localize('SavedSuccessfully'));
_modalManager.close();
//Get rid of the following line
// abp.event.trigger('app.createOrEditXyzClientModalSaved');
//Replace with something like this
//window.location.href = "/App/XyzClients/OpenFile?id=" + xyzClient.id;
}).always(function () {
_modalManager.setBusy(false);
});
};
I have been using the Rad Tool to generate some Entities and quite a few have about 15 -20 fields. As a result the Modal pages that are generated can be quite long and require the page to be scrolled up and down to see the entire form.
Occasionally I have noticed that the page scrolling stops working and the only way to see the bottom part of the Modal dialog is to tab through the fields.
I have just managed to isolate what is causing the issue.
If the Rad Tool generated Entity has a Navigation Property, then the Generated Modal dialog includes a Pick tool to choose the related data. If you click on the Pick button and then close the dialog, the scrolling no longer works on the underlying Modal.
(It does this whether you choose an item from the Pick tool or not.)