Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.2.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
C#
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