You would need to disable the Appropriate data filter in your unit of work. See https://aspnetboilerplate.com/Pages/Documents/Data-Filters#imayhavetenant
Hi all,
Running v7.0.0 MVC/jQuery build.
When running through VS in IISExpress, UserFriendlyExceptions are being returned correctly. When publishing to IIS, I'm getting back the generic "Error detail not sent by Server" message. I've all setting values for <customErrors mode="xyz" />, as mentioned in other posts, as well as setting my ASPNETCORE_ENVIRONMENT environment variable, to no avail. I'm sure this is just a configuration setting as it's fine under localhost. What am I missing? I should mention I've published in debug mode, not release.
The correct response from localhost build:
{"result":null,"targetUrl":null,"success":false,"error":{"code":0,"message":"Error Message Here","details":null,"validationErrors":null},"unAuthorizedRequest":false,"__abp":true}
Response from published build:
The page cannot be displayed because an internal server error has occurred.
I have also tried setting
Configuration.Modules.AbpWebCommon().SendAllExceptionsToClients = true;
Awesome, thanks! I'll apply that now and plan on jumping to 8x shortly. Appreciate your help.
Running power tools 2.0.4 with aspnetzero 7.0.0.0 on MVC/Jquery build. Every time I run the RAD tool to scaffold out a new entity, the UI sorting is broken. It appears the tool is adding the entity type name onto the output (see screenshot 2). I've been going in and manually removing this but it's a bit frustrating and time consuming. Am I doing something wrong or is this something others have run into?
I should mention that I also have v1.9.2.2 of the RAD tool installed as I support a client on 6x, but it is disabled via VS Extensions.
@maliming I was actually able to track this down to how I was handling datatables inside of modal windows:
$(document).on('shown.bs.tab', 'a[data-toggle="tab"]', function (e) {
$($.fn.dataTable.tables(true)).css('width', '100%');
$($.fn.dataTable.tables(true)).DataTable().columns.adjust().draw();
});
I added this code due to an issue with datatables in hidden tabs not spanning the width of their container. Removed the code and problem resolved itself.
Hello,
Running v7.0.0 with MVC/jQuery stack. I'm running into an odd issue that I can't seem to track down.
What's happening is:
I've tried tracking this down but haven't had success yet. Has anyone else experienced this behavior?
@ryancyq, thanks for your reply.
The solution I came up with this morning, which works but is not the most elegant -- I've modified ModalManager.js to look for the existence of either an UnauthorizedException or UserFriendlyException in the html response. If found, I parse out the message and display it, rather than the default InternalServerError.
**@webking **
It was a bit of a manual process, but my upgrade was done by:
All told it was about a full days' work.
@ismcagdas I do, yes. Which I think is the expected behavior, based on https://aspnetboilerplate.com/Pages/Documents/MVC-Controllers#exception-handling-result-wrapping if I'm reading it correctly. I just wasn't sure if ASPNZ had something baked in that already handled this sort of overriding, or if I need to homebrew something.
@robrechtbelien , have you looked at background tasks to accomplish this? See https://aspnetboilerplate.com/Pages/Documents/Background-Jobs-And-Workers You can add a BackgroundJob at any time, you would just need to calculate offset from Clock.Now until the start of your event, minus 5 minutes. I am doing something similar in my app.
Take a look at **Abp.BackgroundJobs.BackgroundJobManager, EnqueueAsync() method: **
[UnitOfWork]
public virtual async Task<string> EnqueueAsync<TJob, TArgs>(TArgs args, BackgroundJobPriority priority = BackgroundJobPriority.Normal, TimeSpan? delay = null)
where TJob : IBackgroundJob<TArgs>
{
var jobInfo = new BackgroundJobInfo
{
JobType = typeof(TJob).AssemblyQualifiedName,
JobArgs = args.ToJsonString(),
Priority = priority
};
if (delay.HasValue)
{
jobInfo.NextTryTime = Clock.Now.Add(delay.Value);
}
await _store.InsertAsync(jobInfo);
await CurrentUnitOfWork.SaveChangesAsync();
return jobInfo.Id.ToString();
}