Microsoft bot deployed to local server get 502.5 errorRSS

2 replies

Last post May 16, 2019 06:12 AM by Brando Zhang

  • Microsoft bot deployed to local server get 502.5 error

    May 14, 2019 03:33 AM|Grace_F|LINK

    I created a bot use microsoft bot template and tested in VS and emulator, it works fine in local iis express. Then I tried to publish this bot service in local server (not azure) and host it in server's iis, then I got error 502.5.

    I've tried to configure both http and https bindings for this service and both get 502.5 error, to guarantee the .net core version's right, I tried to execute dotnet ./xxx.dll directly from CMD and this bot service started successfully.

    I also catch the failed request log, and it looks like this:

    <?xml version="1.0" encoding="UTF-8" ?>
    <?xml-stylesheet type='text/xsl' href='freb.xsl'?>
    <!-- saved from url=(0014)about:internet -->
    <failedRequest url="http://localhost:91/"
    tokenUserName="NT AUTHORITY\IUSR"
    <Event xmlns="">
    <Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
    <TimeCreated SystemTime="2019-05-14T01:59:41.182Z"/>
    <Correlation ActivityID="{8000003D-0002-FF00-B63F-84710C7967BB}"/>
    <Execution ProcessID="8560" ThreadID="16908"/>
    <Data Name="ContextId">{8000003D-0002-FF00-B63F-84710C7967BB}</Data>
    <Data Name="SiteId">5</Data>
    <Data Name="AppPoolId">TEF_Helper</Data>
    <Data Name="ConnId">1610612796</Data>
    <Data Name="RawConnId">0</Data>
    <Data Name="RequestURL">http://localhost:91/</Data>
    <Data Name="RequestVerb">GET</Data>
    <RenderingInfo Culture="en-US">
    <ExtendedTracingInfo xmlns="">

    I double checked firewall and everything I can imagine, even restarting this web service and the whole iis for several times, but this problem just never goes away. 

    I think there's should be something wrong with my webconfig of this bot service, here is my web.config:

    <?xml version="1.0" encoding="utf-8"?>
    <location path="." inheritInChildApplications="false">
    <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
    <aspNetCore processPath="dotnet" arguments=".\TEF-Helper.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
    <add path="*">
    <add provider="ASP" verbosity="Verbose" />
    <add provider="ASPNET" areas="Infrastructure,Module,Page,AppServices" verbosity="Verbose" />
    <add provider="ISAPI Extension" verbosity="Verbose" />
    <add provider="WWW Server" areas="Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module,FastCGI,WebSocket,ANCM" verbosity="Verbose" />
    <failureDefinitions statusCodes="502.5" />
    <!--ProjectGuid: c4f03d62-fa64-4ff9-b405-468c9f520a93-->

    Can somebody help me then? Thank you so much.   

  • Re: Microsoft bot deployed to local server get 502.5 error

    May 14, 2019 03:36 AM|lextm|LINK

    If you run a diagnostics report, it should reveal enough information, 

    Lex Li
    IIS Consulting Services at
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: Microsoft bot deployed to local server get 502.5 error

    May 16, 2019 06:12 AM|Brando Zhang|LINK

    Hi Grace_F,

    According to your description, I guess you need to use some tool like windbg or task manager to capture the dump.Then you could upload it and share the dump with Microsoft Engineer to analysis the reason.

    More details about how to use windbg to capture the dump, you could refer to below link: 

    More details about how to use task manager to capture the dump, you could refer to below link: 

    Best Regards,