Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Bot App deployed by Composer cannot start #4348

@kuacci

Description

@kuacci

Deploy to existing web app on azure not work

We followed below document of composer to publish bot to an existing web app instance running on azure. The publish output prompt success, but we got 502.5 response.

The error of 502.5
image

The error we got from stdout log:

 A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in  'D:\home\site\wwwroot\'.
Failed to run as a self-contained app. If this should be a framework-dependent app, add the D:\home\site\wwwroot\Microsoft.BotFramework.Composer.WebApp.runtimeconfig.json file specifying the appropriate framework. 

After investigate further, we noticed that bot was set to OutOfProcess mode and the process of dotnet.exe didn't startup because the file deployed by composer missed <entry-dll>.runtimeconfig.json.

we can find EchoBot.runtimeconfig.json, but the the entry was set to Microsoft.BotFramework.Composer.WebApp.dll instead of EchoBot.dll in web.config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet" arguments=".\Microsoft.BotFramework.Composer.WebApp.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="OutOfProcess" />
    </system.webServer>
  </location>
</configuration>

After we uploaded file Microsoft.BotFramework.Composer.WebApp.runtimeconfig.json then it works.

It's all good if we deploy bot to a new azure resource.

https://docs.microsoft.com/en-us/composer/how-to-publish-bot#deploy-to-new-azure-resources

Version

We pulled the latest code from composer repo and build it in azure vm. The document link as below:

https://docs.microsoft.com/en-us/composer/how-to-host-composer

Browser

  • Electron distribution
  • Chrome
  • Safari
  • Firefox
  • Edge

OS

  • macOS
  • Windows
  • Ubuntu

To Reproduce

Steps to reproduce the behavior:

  1. Go to publish tab of composer
  2. Edit the profile and set the name of existing web app to hostname field, and other required fields like appId, appPassword and access token.
  3. Run publish and prompt success.
  4. Go to the existing web app and access its page or https://<app-name>/api/messages then see the error

Expected behavior

Please help to point out anything we are missing to config composer if this is not an issue of composer.

Otherwise, we expected that app published by composer should be qualified for app service requirement, like the dotnet runtime configuration file for entry assembly should be deployed to app service as well if it is self-contained.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions