• 1 min read

Server aliases for Azure Analysis Services

Server aliases for Azure Analysis Services allow users to connect to an alias server name instead of the server name exposed in the Azure portal. This can be used in the following scenarios.…

Server aliases for Azure Analysis Services allow users to connect to an alias server name instead of the server name exposed in the Azure portal. This can be used in the following scenarios:

  • Migrating models between servers without affecting users.
  • Providing friendly server names that are easier for users to remember.
  • Direct users to different servers at different times of the day.
  • Direct users in different regions to instances of Analysis Services that are geographically closer, for example using Azure Traffic Manager.

Any HTTP endpoint that returns a valid Azure Analysis Services server name can provide this capability using the link:// format.

For example, the following URL returns an Azure Analysis server name.

01 URL

Users can connect to the server from Power BI Desktop (in addition to other client tools) using the link:// format.

02 PBI Desktop

To create the HTTP endpoint, various methods can be used. For example, a reference to a file in Azure Blob Storage containing the real server name can be used.

In this case, an ASP.NET Web Forms Application was created in Visual Studio 2017. The master page reference and user control was removed from the Default.aspx page. The contents of Default.aspx are simply the following Page directive.

<%@ Page Title="Home Page" Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="FriendlyRedirect._Default" %>

The Page_Load event in Default.aspx.cs uses the Response.Write() method to return the Azure Analysis Services server name.

protected void Page_Load(object sender, EventArgs e)

{

    this.Response.Write(“asazure://southcentralus.asazure.windows.net/XXX”);

}

The website is deployed directly to Azure using the publish feature in Visual Studio.

03 Publish

That’s it! We hope you’ll agree this is a very simple and useful feature.