Hi
Sorry, [it was my mistake. I was not passing the tenantId properly to the method.
new TenantRoleAndUserBuilder(context, Tenant.Id).Create();
Issue fixed
Hi,
No Actually . But it is a multi tenant ( Multiple DB) Application
Thank you :)
Thank you :)
Thank you, It worked .
Thanks ismcagdas and hikalkan
When i tried that i am getting another exception
Castle.MicroKernel.ComponentNotFoundException
No component for supporting the service RentMoji.Web.BackGroundJobs was found
Castle.MicroKernel.ComponentNotFoundException: No component for supporting the service RentMoji.Web.BackGroundJobs was found
at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy)
at Castle.MicroKernel.DefaultKernel.Resolve(Type service, IDictionary arguments)
at Castle.Windsor.WindsorContainer.Resolve(Type service)
at Abp.Dependency.IocManager.Resolve(Type type) in D:\Halil\GitHub\aspnetboilerplate\src\Abp\Dependency\IocManager.cs:line 194
at Abp.Hangfire.HangfireIocJobActivator.ActivateJob(Type jobType) in D:\Halil\GitHub\aspnetboilerplate\src\Abp.HangFire\Hangfire\HangfireIocJobActivator.cs:line 24
at Abp.Hangfire.HangfireIocJobActivator.HangfireIocJobActivatorScope.Resolve(Type type) in D:\Halil\GitHub\aspnetboilerplate\src\Abp.HangFire\Hangfire\HangfireIocJobActivator.cs:line 48
at Hangfire.Server.CoreBackgroundJobPerformer.Perform(PerformContext context)
at Hangfire.Server.BackgroundJobPerformer.<>c__DisplayClass8_0.<PerformJobWithFilters>b__0()
at Hangfire.Server.BackgroundJobPerformer.InvokePerformFilter(IServerFilter filter, PerformingContext preContext, Func1 continuation) at Hangfire.Server.BackgroundJobPerformer.<>c__DisplayClass8_1.<PerformJobWithFilters>b__2() at Hangfire.Server.BackgroundJobPerformer.PerformJobWithFilters(PerformContext context, IEnumerable
1 filters)
at Hangfire.Server.BackgroundJobPerformer.Perform(PerformContext context)
at Hangfire.Server.Worker.PerformJob(BackgroundProcessContext context, IStorageConnection connection, String jobId)
Here is my Code
public class BackGroundJobs:IBackGroundJobs
{
public void AddJob1()
{
RecurringJob.RemoveIfExists("Job1");
RecurringJob.AddOrUpdate("Job1", () => Job1(), Cron.Daily(11, 47));
}
public void Job1()
{
DependencyResolver.Current.GetService<ISubscriberAppService>().SendEmailToSubscribers();
}
}
I am using hangfire in inside my web project.
// inside my controller i have added these lines
RecurringJob.RemoveIfExists("Job1");
RecurringJob.AddOrUpdate("Job1", () => Job1(), Cron.Daily(11, 47));
public void Job1() {
//Do some job
}
Thanks for the reply. My issue got solved. we must use property "Enlist=false" inside connection string when we are dealing with multiple db with same unit of work . Thank you