Help Docs

Azure Service deployment

Deployment steps

  1. Add the following to the WebRole project and set their "Copy to Output" property to "Copy Always". 
    a. .NET agent Installer (apminsight­-dotnetagent­.msi),
    b. The "apminsight.conf" file, containing license key and other configuration options, and, 
    c. The batch file, "deploy­-apminsight.cmd".
  2. Add a startup task in the service definition (.csdef) file as follows :
     <ServiceDefinition>
       <WebRole>
          <Startup>
            <Task commandLine="deploy­-apminsight.cmd configfile=apminsight.conf 

    appfilterconfigfile=appfilter.conf multimonitor=true/false" 
    executionContext="elevated" taskType="background"/>
          </Startup>
       </WebRole>
    </ServiceDefinition>

Known Issues and Workarounds

In Azure machines, the "W3SVC" service (World Wide Web Publishing Service) has its startup type as "Manual" by default. This might cause a "Service Unavailable" issue when visiting websites after .NET agent is installed (IIS reset happens during installation). Set this startup type to "Automatic" to workaround this issue. This can be achieved by adding the following line in the batch file before the installation command, sc config w3svc start= auto.

Copy and paste the below script in a new text file and name it as deploy­-apminsight.cmd.

deploy­-apminsight.cmd

REM Install the ApmInsight agent on Windows Azure 
SETLOCAL EnableExtensions 
REM Bypass the installation if already installed 
IF DEFINED COR_PROFILER GOTO :END
IF NOT EXIST apminsight-dotnetagent.msi GOTO :END
REM set the w3svc IIS worker process startup service to auto
sc config w3svc start= auto
REM Install the agent
apminsight-dotnetagent.msi /quiet /log %windir%\ApmInsightInstall.log editconfig=false %*
:END
EXIT /B %ERRORLEVEL%

Was this document helpful?

Would you like to help us improve our documents? Tell us what you think we could do better.


We're sorry to hear that you're not satisfied with the document. We'd love to learn what we could do to improve the experience.


Thanks for taking the time to share your feedback. We'll use your feedback to improve our online help resources.

Shortlink has been copied!