What are the plans for supporting this on ASP.NET Core 2.1?
Given the takeup of ASP.NET Core 2.0 when it came out, I guess most people will be upgrading to 2.1 as soon as it is ready.
@nrandell, I think it depends on the compatibility story.
If it's easy to "Multi-Target", then supporting both seems like a great idea. If we have to have a 3rd integration library (ASP.Net WebAPI, Core 2, Core 2.1) then it's something we'll need to evaluate.
Personally, I suspect @drub0y will have an ASP.Net Core 2.1 integration PR submitted very soon after 2.1 is released.
So, this is a bit of an overloaded question. The short answer is: it should "just work".
First, .NET Core has declared they are using a "roll-forward" approach to their major versions, so whatever works on 2.0 should work on all 2.x. So that means if you were to spin up a new project and target .NET Core 2.1, you will be able to use all of our libraries. Not only that, but, since the libraries are targeting .NET Standard 2.0, they should continue to run anywhere that supports that standard subset of APIs.
Next, from a runtime perspective, we will automatically gain from any JIT/CLR optimizations in the 2.1 obviously. Additionally, if you wanted to configure your ASP.NET 2.1 host with something like the new Socket transport to benefit from it's performance gains over the libuv version, you could do that and the BFSDK wouldn't know the difference.
Finally, from a perspective of leveraging new APIs (e.g. HttpClientFactory), obviously we would need to upgrade the codebase to utilize newer APIS . This would take a little longer as it would mean bumping dependency versions and, as always, that's a delicate game that takes a good amount of consideration.
That's what I thought. I've had it running on 2.1, but found some issues running on Azure where I kept on getting 502.3 errors when sending activities at certain times.
However - and this is a big however - I think it may have been down to user error on my part, which is why I wanted to ask the question about should it work rather than a specific problem.
Now I've got my scenario working under 2.0, I can try again with 2.1 to see if the problems still exist and update this thread.
Great, let us know!
fr000141.zip
So I switched back to 2.1 and the same errors.
The behaviour I'm seeing is that it just hangs!
I have some code that sends an activity on conversationUpdate
I've created a tracing interceptor for the ServiceClient and can see that it Enters the SendToConversation method, but never returns.
e.g.
EnterMethod 2 Microsoft.Bot.Connector.Conversations SendToConversation ({conversationId=f3456a989694439db4665692bee86d0f,activity=Microsoft.Bot.Schema.Activity,cancellationToken=System.Threading.CancellationToken})
The azure Application Logs show a few 502.3 bad gateway errors in the AspNetCoreModule. Example included in the log file. I've tried both inprocess and outofprocess hosting and that doesn't appear to do anything.
I suspect it's something to do with the AspNetCoreModule rather than the botbuilder framework, but I thought this is a good place to start.
I wonder if it's something to do with the fact that the SendToConversation method is talking back to the originating site, but not in response to the original request and things are getting confused!
Switching back to aspnetcore 2.0 and it all works ok.
Here's an example from some of the logs
EnterMethod 2 Microsoft.Bot.Connector.Conversations SendToConversation ({conversationId=64466e8d3432479b8c20420bdd24c962,activity=Microsoft.Bot.Schema.Activity,cancellationToken=System.Threading.CancellationToken})
SendRequest 2 Method: POST, RequestUri: 'https://webchat.botframework.com/v3/conversations/64466e8d3432479b8c20420bdd24c962/activities', Version: 1.1, Content: .....
ReceiveResponse 2 StatusCode: 200, ReasonPhrase: 'OK', Version: 1.1, Content: System.Net.Http.NoWriteNoSeekStreamContent, Headers:....
ExitMethod 2 Microsoft.Rest.HttpOperationResponse`1[Microsoft.Bot.Schema.ResourceResponse]
I'll create a test repository that shows this as well.
So I created a new test repository (https://github.com/nrandell/botbuilder-dotnet-issue-448) - and guess what - it all works ok!
I then switched the original version back to 2.1 and it worked ok.
This may be something transient that is down to the roll out of 2.1
I'll close the issue for now.