ComponentOne Web API Edition
In This Topic
    Configure Azure Web API Service
    In This Topic

    To configure Azure Web API Service and perform different operations, follow these steps:

    1. Configure Storage Connection String
    2. Register the Cloud Service
    3. Perform Operations

    Step 1: Configure Storage Connection String

    1. Create Storage Account in Azure and configure connection string. For detailed information on how to configure the connection string, see Configure Azure Storage connection strings.
    2. Create container to store the files. For more information on how to create a container in Azure portal, see Create a container.
    Back to Top

    Step 2: Register the Cloud Service

    1. Create a new C1 Web API Application and make sure the following references are added to the application:
      • C1.Web.Api.dll
      • C1.Web.Api.Cloud.dll
      • Microsoft.WindowsAzure.Storage.dll
    2. Add StorageProvider in Startup.cs file for registering the Azure cloud service using the following code:
      Copy Code
      string AzureConnectionString = 
      app.UseStorageProviders().AddAzureStorage("Azure", "AzureStorageConnectionString");
    3. Add a controller that inherits ApiController within the Controller folder.
    Back to Top

    Step 3: Perform Operations

    You can choose to perform various operations, such as listing data, uploading, deleting or downloading a file, after registering the cloud service. To understand how to perform these operations, see Perform Operations.

    Back to Top