Direct Line App Service extension disconnect issues

This post has been republished via RSS; it originally appeared at: IIS Support Blog articles.

Recently we saw multiple scenarios where Direct Line App Service extension is getting disconnected without any reason, or after the process restart or configuration changes not able to establish connection through NamedPipes which is resulting in Bot downtime.

 

Symptoms of this issue is when you browse https://<your_app_service>.azurewebsites.net/.bot it display as below

 

{"v":"123","k":true,"ib":false,"ob":false,"initialized":true}

 

product group is aware about the ongoing issue and currently working on releasing permanent fix.

 

As a workaround to mitigate the issue we can delay the NamedPipe connection as below in startup.cs.

 

public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseDefaultFiles() .UseStaticFiles() .UseWebSockets() // Allow the bot to use named pipes. //.UseNamedPipes(System.Environment.GetEnvironmentVariable("APPSETTING_WEBSITE_SITE_NAME") + ".directline") .UseRouting() .UseAuthorization() .UseEndpoints(endpoints => { endpoints.MapControllers(); }); //Delay NamedPipes connection by 10 sec Task.Run(() => { Thread.Sleep(10000); app.UseNamedPipes(System.Environment.GetEnvironmentVariable("APPSETTING_WEBSITE_SITE_NAME") + ".directline"); });

 

Hope this helps!!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.