Skip to main content
All docs
V24.1

IAzureResourceProvisionService.CreateRequiredResourcesAsync() Method

Creates and configures the required resources in Azure Storage data services and in the Service Bus.

Namespace: DevExpress.XtraReports.Web.Azure

Assembly: DevExpress.XtraReports.v24.1.Web.Azure.dll

NuGet Package: DevExpress.Web.Reporting.Azure

Declaration

Task CreateRequiredResourcesAsync()

Returns

Type Description
Task

A task that creates and configures resources.

Remarks

For Azure service integrations, obtain an instance of IAzureResourceProvisionService from the ServiceCollection and call the CreateRequiredResourcesAsync method to create and configure the required resources in Azure Storage data services and optionally in the Service Bus (depending on your configuration):

ASP.NET Core Applications
using DevExpress.XtraReports.Web.Azure;
//...
using(var serviceScope =  = app.Services.CreateScope()) {
  var azureResourceInitializer = serviceScope.ServiceProvider.GetService<IAzureResourceProvisionService>();
  azureResourceInitializer.CreateRequiredResourcesAsync().GetAwaiter().GetResult();
} 
ASP.NET MVC and Web Forms Applications
using DevExpress.XtraReports.Web.Azure;
//...
protected void Application_Start(object sender, EventArgs e) {
//...
  DevExpress.XtraReports.Web.ASPxWebDocumentViewer.StaticInitialize(); 
  // DevExpress.XtraReports.Web.ASPxReportDesigner.StaticInitialize();
  ((IAzureResourceProvisionService)DefaultWebDocumentViewerContainer.Current.GetService(typeof(IAzureResourceProvisionService))).CreateRequiredResourcesAsync().GetAwaiter().GetResult();
}
See Also