# Core Billing

### Backup the current version artifacts

* Stop the Billing agent service
* Take a back up of the Billing agent service and API config file
  * API - C:\inetpub\MgmtSvc-CloudAssertBilling\bin\Web.config
  * Agent config file - C:\Program Files\CloudAssertBilling\CloudAssert.WAP.Billing.AgentService\CloudAssert.WAP.Billing.AgentService.exe.config
* Back up the Templates from C:\inetpub\MgmtSvc-CloudAssertBilling\Templates and C:\Program Files\CloudAssertBilling\CloudAssert.WAP.Billing.AgentService\Templates
* Back up the Billing database

### Install the new build

* Make sure IIS\_USR has access to the “C:\inetpub\MgmtSvc-CloudAssertBilling” folder
* Uninstall the existing version of the Billing agent service and API
* Install the latest Billing API
* Install latest Billing Agent
* Stop the Billing Agent
* Replace the respective backed up templates to C:\inetpub\MgmtSvc-CloudAssertBilling\Templates and C:\Program Files\CloudAssertBilling\CloudAssert.WAP.Billing.AgentService\Templates
* Refer the previous version's of the API and Agent config file and change the current ones
* Update the billing database using Billing Tool

```
BILLING.EXE UpdateDatabase /ApiEndpoint:fillHere /Username:fillHere /Password:fillHere
```

* Start the agent service

### Post-deployment validation

* Check for the version details in the About Page in Admin Portal, it should have the latest versions installed
* Make sure all the pages loaded properly in Admin and Tenant portal


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cloudassert.com/azure-stack-billing/2010.2/installation/updates/billing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
