Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "ajayak"

Answer

<cite>maliming: </cite> :) "CorsOrigins": "http://*.mycompany.com,http://localhost:4200,http://localhost:49152,http://localhost:9222"

Hehehe Thanks @maliming :D

Answer

<cite>maliming: </cite> Yes, CorsOrigins is this feature.

Yes! What value should I set in CorsOrigin?

Question

Hi,

I am planning to create an ionic capacitor app on top of AspNetZero Angular frontend. For the app to work, I need to enable CORS.

The capacitor wraps the app in a webview and runs the app localhost:9222. Should I just add this URL to the CORS list in appsettings.json? Is this a good approach?

I followed all the steps but the new generated theme does not have the color that's defined by me in MetronicThemeChanger.Themes class.

I even tried changing color of yellow theme to #E80C7A for testing and ran the tool. But even then I can't find E80C7A in any file generated in yellow folder.

On UI, it appears as default color. Is there any step missing on <a class="postlink" href="https://github.com/aspnetzero/metronic">https://github.com/aspnetzero/metronic</a> ?

Thanks @ryancyq

<cite>BobIngham: </cite> @ajayak, Hope this helps. This definition will run at midnight, first day of the month.

RecurringJob.AddOrUpdate<InvoiceBackgroundWorker>(job => job.Start(), "0 0 1 * *");

I'm sure it will be fired by server time and not by system time and therefore Timer.Period should be irrelevant. That's why clocks go back and forward at 02:00 and not 01:00!!!! If you have a system which has several timezones then it's another matter altogether, you will need a job to run at the offset between server time and UTC to run each hour and process data for each timezone in the system. Good luck with that if that's what you have to do. I once worked on a global betting system which had to do something similar!

Thanks @BobIngham,

But how will Timer property affect this? Does that mean the job will run with cron and with the set timer?

Hi,

I have created a background worker that should run on 1st of every month. I can easily do this using hangfire cron jobs but I'm not sure, what is the effect of Timer.Period property has on this.

If I skip entering the timer property, I get exception. If I fill Timer property, I don't want the code to execute on any other day than 1st of every month.

What is the best approach to achieve this? :D

I'm using something like below:

RecurringJob.AddOrUpdate<InvoiceBackgroundWorker>(job => job.Start(), Cron.MonthInterval(0));

<cite>strix20: </cite> You should just need a log4net appender set up.

We use Graylog, so I don't have any experience with Sentry, but a cursory google search found this:

[https://github.com/MCKanpolat/SharpRaven.Log4Net.Core])

Thanks @strix20 :)

I found a simple solution as well. In my case, I only want real exceptions logged instead of UserFriendlyException. I did some exploration on AspNetBoilerplate docs and found this code to handle all types of exceptions:

public class ExceptionHandler : IEventHandler<AbpHandledExceptionData>, ITransientDependency

Now I can easily filter specific exceptions and log them to Sentry or any other service.

Question

I want to extend the default Logger to log errors to Sentry.

How can I extend the Logger implementation? I want to use the base logging functionality with the addition of my custom code.

<cite>alper: </cite> Hi,

The docs explain how to authorize HangFire Dashboard; <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Hangfire-Integration#dashboard-authorization">https://aspnetboilerplate.com/Pages/Doc ... horization</a>

See the related posts; <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1245">https://github.com/aspnetboilerplate/as ... ssues/1245</a> <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1971">https://github.com/aspnetboilerplate/as ... ssues/1971</a>

Hi @alper,

I am using Hangfire in Web.Host solution not the MVC project. I am able to access the hangfire dashboard when I comment the hangfire authorization filter. But I cannot find a good way to access the hangfire dashboard when Authorization filter is added.

I believe this should be an inbuilt feature in AspNetZero template.

Showing 91 to 100 of 202 entries