0
amer_op created
hello , i am having preplem with this code -->
public IServiceProvider ConfigureServices(IServiceCollection services)
{
services.AddDevExpressControls(settings => settings.Resources = ResourcesType.ThirdParty | ResourcesType.DevExtreme);
var session = IocManager.Instance.Resolve<IAbpSession>();
DevExpress.XtraReports.Web.Extensions.ReportStorageWebExtension.RegisterExtensionGlobal(new MyReportStorageWebExtension(session));
}
it throws this exception --?>
ComponentNotFoundException: No component for supporting the service Abp.Runtime.Session.IAbpSession was found
Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy)
Castle.MicroKernel.DefaultKernel.Resolve(Type service, IDictionary arguments)
Castle.Windsor.WindsorContainer.Resolve<T>()
Abp.Dependency.IocManager.Resolve<T>()
SmartOptical.Web.Startup.Startup.ConfigureServices(IServiceCollection services) in Startup.cs
+
DevExpress.XtraReports.Web.Extensions.ReportStorageWebExtension.RegisterExtensionGlobal(new MyReportStorageWebExtension(IocManager.Instance.Resolve<IAbpSession>()));
Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
Microsoft.AspNetCore.Hosting.Internal.WebHost.Initialize()
Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
any help ? all i want is to use AbpSession object in side 'MyReportStorageWebExtension' class
6 Answer(s)
-
0
Please try moving the code below into the module's
PostInitialize
methodvar session = IocManager.Instance.Resolve<IAbpSession>(); DevExpress.XtraReports.Web.Extensions.ReportStorageWebExtension.RegisterExtensionGlobal(new MyReportStorageWebExtension(session));
-
0
-
0
any thoughts ?
-
0
Can you access
HttpContext
in the method ofMyReportStorageWebExtension
?see Determining Current Tenant:https://aspnetboilerplate.com/Pages/Documents/Multi-Tenancy#determining-current-tenant
-
0
Can you access
HttpContext
in the method ofMyReportStorageWebExtension
?see Determining Current Tenant:https://aspnetboilerplate.com/Pages/Documents/Multi-Tenancy#determining-current-tenant
-
0
This issue is closed because it has not had recent activity for a long time.