Giter VIP home page Giter VIP logo

botframework-directline-dotnet's Introduction

BotFramework-DirectLine-DotNet

Contributing

This project welcomes contributions and suggestions. Guidelines for contributions can be found in CONTRIBUTING.md

Reporting Security Issues

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) at [email protected]. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.

License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT License.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

botframework-directline-dotnet's People

Contributors

brucehaley avatar ericdahlvang avatar gabog avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar msftgits avatar sgellock avatar tracyboehrer avatar xieofxie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

botframework-directline-dotnet's Issues

.Net DirectLine Support for Unity

Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.

Version

2.3.0

Describe the bug

I added the following Universal.Microsoft.Bot.Connector.DirectLine dll and its dependencies to the project's Assets\Plugins folder in Unity and now when I open the project I get an error saying the assemblies have been unloaded because they can cause crashes.

To Reproduce

Just add the dll to the Assets\Plugins folder as described in the Unity documentation and open the project.

Expected behavior

I expected to be able to use the bot connector to connect to my botframework bot running on Azure.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

[bug]

Adaptive card not displayed in the BotFramework-DirectLine-DotNet

When we are trying to send a simple adaptive card it is getting displayed in the webchat and emulator but while using it in a client application(Mobile which uses directline .net client it is not getting displayed. Is there anything we have to specially do to handle it? The adaptive card is getting displayed in the emulator as well as in the webchat)

.NET Client to Connect to Direct Line App Service extension results in 403 exception

Version

What package version of the SDK are you using.
Microsoft.Bot.Builder.Integration.AspNet.Core:4.21.0

Describe the bug

After creating a .NET Client to Connect to Direct Line App Service extension, a 403 error is thrown.
Documentation for creating DLASE Client in .NET: https://learn.microsoft.com/en-us/azure/bot-service/bot-service-channel-directline-extension-net-client?view=azure-bot-service-4.0

To Reproduce

Steps to reproduce the behavior:

  1. Configure a .NET bot for Direct Line App Service extension from this documentation
    a. Important: Please make sure to include MicrosoftAppTenantId in app service configuration after deployment
  2. Create .NET Client to Connect to Direct Line App Service extension, by following this documentation 
  3. Cloned the BotFramework-DirectLine-DotNet project locally. Do not use NuGet or any external third-party package manager for this BotFramework-DirectLine-DotNet library. Once cloned, add a project reference from your C# client app to the BotFramework-DirectLine-DotNet project.
  4. Run the .NET DLASE Client and observe the error

Expected behavior

Run .NET Client to Connect to Direct Line App Service extension without errors.

Error details

System.AggregateException: "One or more errors occurred. (The server returned status code '403' when status code '101' was expected.)" ---> System.Net.WebSockets.WebSocketException: "The server returned status code '403' when status
code '101' was expected." at System.Net.WebSockets.WebSocketHandle.d__13.MoveNext()\n at System.Net.WebSockets.ClientWebSocket.d__15.MoveNext()\n at Microsoft.Bot.Streaming.Transport.WebSockets.WebSocketClient.d__21.MoveNext()\n at Microsoft.Bot.Streaming.Transport.WebSockets.WebSocketClient.d__20.MoveNext()\n at Microsoft.Bot.Connector.DirectLine.StreamingConversations.d__15.MoveNext() in /Users/ram/Documents/bot/BF/directline_bots/Csharp/CSharpDLASEClient/BotFramework-DirectLine-DotNet/libraries/Streaming/StreamingConversations.cs:line 77\n at CustomerDLASE_ConsoleApp.DirectLineInterface.d__7.MoveNext() in /Users/ram/Documents/bot/BF/directline_bots/Csharp/CSharpDLASEClient/CustomerDLASE_ConsoleApp/Directline.cs:69 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\n at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)\n at System.Threading.Tasks.Task.Wait()\n at Program.

$(String[] args) in /Users/ram/Documents/bot/BF/directline_bots/Csharp/CSharpDLASEClient/CustomerDLASE_ConsoleApp/Program.cs:24

[bug]

Reconnect to an existing old conversation at any instance

Problem:
Currently, the directline has a cache of the conversation history only for 24 hours. The conversationId which is used to reconnect to the conversation also gets obsolete after a few days/weeks, disabling the client to reconnect to the ongoing conversation.

Feature to overcome the problem:
There should be a feature that would let the client reconnect to a conversation exactly where they left off(This is possible for now but only for 24 hours), also after 24 hours or many weeks after leaving the conversation.

Directline client fails to start a conversation for the new Language Services bot

Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.

Version

Microsoft.Bot.Connector.DirectLine 3.0.3-Preview1

Describe the bug

I have created a new language services resource, a custom question answer library in it and then connected it to a bot.
see: https://techcommunity.microsoft.com/t5/ai-cognitive-services-blog/question-answering-feature-is-generally-available/ba-p/2899497
Then I enabled direct channel on the bot resource. grabbed the key and then plugged it in my existing solution. Note, the existing solution works fine if I connect to a bot (what microsoft now calls classic).

To Reproduce

Steps to reproduce the behavior:

  1. Go to your bot, enable direct channel and grab the key
  2. Go to the console program and plugin the key
  3. run program
  4. See error

Expected behavior

bot message should be received

[bug]

.Net Client-side NuGet : support reconnection when the secret is server-side

Issue

In the Microsoft BotBuilder family, the .Net NuGet package Microsoft.Bot.Connector.DirectLine is not Open Source and does not have a GitHub repo, so I open this issue here.

In the bot service documentation, it says that if an app has an expired token (too late to be renewed) in the client side, it should ask the server-side of the application to create a new token for the current conversation, based on the secret (that the server-side has but not the client-side) : Reconnect to conversation.

The typescript DirectLine SDK has the documented "reconnect" function which updates the new token and new websocket stream url.

The .Net C# NuGet client SDK does not have a reconnect function which accepts the new token and websocket stream url like the TypeScript SDK does. It only proposes to use the current expired token to create a new one itself. It makes it more difficult to implement bot client in C#.

Proposed change

Adding to the .Net client SDK the feature supported by the TypeScript SDK.

Ideally, open sourcing the client NuGet package too.

Component Impact

The .Net NuGet package Microsoft.Bot.Connector.DirectLine.

Customer Impact

Not able to follow the documentation for expired tokens when creating .Net bot client which uses a token and does not embed the secret itself.

Tracking Status

Dotnet SDK

  • PR
  • Merged

[dcr]

Add DirectLine Service App Extension Support

Use this query to search for the most popular feature requests.

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

[enhancement]

Can this be a nuget package?

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
I'd like this to be a nuget package so I don't need to copy and paste the code and maintain my own version of it.

Describe alternatives you've considered
The alternative detailed in https://docs.microsoft.com/en-us/azure/bot-service/bot-service-channel-directline-extension-net-client?view=azure-bot-service-4.0#create-a-c-direct-line-client has some friction. Can we make it easier for developers?

Mention Entities are ignored when sending Activity

Version

What package version of the SDK are you using. Microsoft.Bot.Connector.DirectLine 3.0.2

Describe the bug

I'm trying to send an Activity with mentions to my Bot, but the mentions always show as empty on the receiving end. Here's a rough outline of the code I'm using:

// Code to set up DirectLine client and start a conversation.

var activity = new Activity
{
    Type = "message",
    From = new ChannelAccount { Id="123", Name="haacked" },
    Text = "hello @haacked",
    Entities = new List<Entity> {
      new Entity
            {
                Type = "mention",
                Properties =
                    JObject.Parse(@"{{""mentioned"": {{""id"": ""123:T123"", ""name"": ""haacked"" }} }}")
            }
   }
};
await client.Conversations.PostActivityWithHttpMessagesAsync(
                conversation.ConversationId,
                activity);

I can see that my bot does receive the message, but the Mentions property is empty. 😦

To Reproduce

Steps to reproduce the behavior:

  1. Deploy a .NET Bot Framework bot to Azure
  2. Register the bot using Azure Bot Service.
  3. Configure a DirectLine connection to the bot.
  4. Write a console app using the DirectLine C# client library that sends an Activity containing Entities to https://directline.botframework.com/.

Expected behavior

The bot would receive an Activity with a populated Mentions property.

Actual behavior

The bot receives the Activity but the Mentions property is empty.

[bug]

Build sample fails on Linux: The reference assemblies for .NETFramework,Version=v4.6.1 were not found

Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.

Version

$ dotnet --list-sdks
3.1.420 [/usr/share/dotnet/sdk]
6.0.301 [/usr/share/dotnet/sdk]

Describe the bug

I installed the recommended version of the dotnet sdk (dotnet-sdk-6.0) following instructions at https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu

then cloned this repo and did:

$ cd BotFramework-DirectLine-DotNet/samples/core-DirectLine/DirectLineClient
$ dotnet build DirectLineSampleClient.csproj 
Microsoft (R) Build Engine version 17.2.0+41abc5629 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  Nothing to do. None of the projects specified contain packages to restore.
/usr/share/dotnet/sdk/6.0.301/Microsoft.Common.CurrentVersion.targets(1221,5): error MSB3644: The reference assemblies for .NETFramework,Version=v4.6.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks [/home/chrb/git/BotFramework-DirectLine-DotNet/samples/core-DirectLine/DirectLineClient/DirectLineSampleClient.csproj]

Build FAILED.

I can't see any way to install dotnet-sdk-4 in Ubuntu - the MS repos only have dotnet package versions 2.1, 3.1, 5.0, and 6.0:

$ apt-cache search dotnet-sdk
dotnet-sdk-2.1 - Microsoft .NET Core SDK 2.1.818
dotnet-sdk-3.1 - Microsoft .NET Core SDK 3.1.420
dotnet-sdk-5.0 - Microsoft .NET SDK 5.0.408
dotnet-sdk-6.0 - Microsoft .NET SDK 6.0.301

To Reproduce

Steps to reproduce the behavior:
As above

Expected behavior

Should compile ok with latest recommended SDK version

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

[bug]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.