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/"
    siteId="5"
    appPoolId="TEF_Helper"
    processId="8560"
    verb="GET"
    remoteUserName=""
    userName=""
    tokenUserName="NT AUTHORITY\IUSR"
    authenticationType="anonymous"
    activityId="{8000003D-0002-FF00-B63F-84710C7967BB}"
    failureReason="STATUS_CODE"
    statusCode="502.5"
    triggerStatusCode="502.5"
    timeTaken="16"
    xmlns:freb="http://schemas.microsoft.com/win/2006/06/iis/freb"
    >
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <System>
    <Provider Name="WWW Server" Guid="{3A2A4E84-4C21-4981-AE10-3FDA0D9B0F83}"/>
    <EventID>0</EventID>
    <Version>1</Version>
    <Level>0</Level>
    <Opcode>1</Opcode>
    <Keywords>0x0</Keywords>
    <TimeCreated SystemTime="2019-05-14T01:59:41.182Z"/>
    <Correlation ActivityID="{8000003D-0002-FF00-B63F-84710C7967BB}"/>
    <Execution ProcessID="8560" ThreadID="16908"/>
    <Computer>WX-TEF-APP01</Computer>
    </System>
    <EventData>
    <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>
    </EventData>
    <RenderingInfo Culture="en-US">
    <Opcode>GENERAL_REQUEST_START</Opcode>
    </RenderingInfo>
    <ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
    <EventGuid>{D42CF7EF-DE92-473E-8B6C-621EA663113A}</EventGuid>
    </ExtendedTracingInfo>
    </Event>

    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"?>
    <configuration>
    <location path="." inheritInChildApplications="false">
    <system.webServer>
    <handlers>
    <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
    </handlers>
    <aspNetCore processPath="dotnet" arguments=".\TEF-Helper.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
    </system.webServer>
    </location>
    <system.webServer>
    <tracing>
    <traceFailedRequests>
    <add path="*">
    <traceAreas>
    <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" />
    </traceAreas>
    <failureDefinitions statusCodes="502.5" />
    </add>
    </traceFailedRequests>
    </tracing>
    </system.webServer>
    </configuration>
    <!--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,

    https://docs.jexusmanager.com/tutorials/ancm-diagnostics.html 

    Lex Li
    https://lextudio.com
    ---------------------------
    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:

    https://github.com/Windower/Issues/wiki/Creating-crash-dumps-with-Windbg 

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

    https://support.microsoft.com/en-sg/help/931673/how-to-create-a-user-mode-process-dump-file-in-windows 

    Best Regards,

    Brando