How to host Microsoft Bot on premise in IIS manager - c#

I have a bot I want to host on premise and I've hosted the bot on a domain with a valid SSL cert via letsencrypt. The cert bound to the domain the bot is hosted on is by IdenTrust (DST Root CA X3) which is a participant of the Microsoft root certification program.
The DB the bot is connected to is the local database in the server. However, the domain the bot is hosted on is accessible via web call. The db can also be accessed via another application hosted under the same site the bot is hosted on.
However, I can't access the bot and I keep getting the error below:
[There was an error sending this message to your bot: HTTP status code InternalServerError]
Please help! Thanks!

Webchat client talks to Azure MS bot through Directline API which is hosted in Azure-cloud. You need to find a way to talk to local MS bot through DirectLine API.
Sadly, I don't think if there is any local(on premise) version of DirectLine API.

Related

How to add OAuth connection settings without Azure Bot Service?

I'm adding authentication to a bot built with Bot Framework SDK v4 (C#) that will work with Microsoft Teams. I've been following add authentication and add SSO tutorials, trying to get it to work. Both of these hyperlinks jump to a requirement I am stuck on, which is to add OAuth connection settings through the Azure Bot Service. I don't have a subscription with Azure and would prefer to avoid it. I just don't want to deal with a subscription to all these services when I need a tiny portion of it. I'm also going to publish the bot on a local server, not to Azure, and I'm pretty sure I only need a standard channel, which should be free.
The tutorials also explain that I need to use Azure Bot Service to generate a Microsoft app id and an app password. It turns out those values can be obtained through a normal app registration, which I need anyways, in Azure AD. They are just app Id and client secret. This is making me wonder if that OAuth connection setting can be created outside of an Azure subscription as well.
As of now, running the 46.teams-auth sample throws me an error explaining that I need a valid connectionName which is obtained by creating an OAuth connection setting.
All I'm trying to do is to implement authentication to a bot that will be used in Teams. So my questions are the following:
What even is the OAuth connection setting and is it necessary to create?
Is it not enough to register the bot application in Azure AD? It's just an API.
Is there any way to create the OAuth connection setting outside of an Azure subscription?
I've already used the Developer Portal, Azure AD, Bot Framework website, and ngrok to successfully test my bot in Teams. Adding authentication is the last step.

Access site from azure which required VPN

I have .NET Core APIS. these APIS accessing some end points of other website and it can be access using VPN connection only, so when I test it in my local machine It works because I have active VPN connection. Now When I am publishing this API as a service on azure, It's returning me error that No host is know. How can I allow azure to access that third party website with VPN connection

Can connect to Salesforce connected app locally but not when published in Azure function

I'm having this issue with my custom integration to Salesforce from an Azure function right now. For some reason when I test locally and use the local endpoint with Postman I can authenticate with Salesforce just fine but when I publish my Azure function to the cloud and I swap out the endpoint my authentication fails for Salesforce. The exact error message being authentication failure.
At first I thought there must be something wrong with my IP settings for the connected app in Salesforce but I've tested setting Relax IP Settings as well as not defining a Trusted IP Range for OAuth Web server flow and still no success. Here are a couple of screenshots of my settings.
Any ideas why I can authenticate locally but not once I publish to my cloud service in Azure? (I'm using SalesForceSharp to authenticate if that makes any difference)
Finally figured out what the disconnect between my cloud environment (Azure) and Salesforce was when I dug into my login history in Salesforce and found attempts to login from an insecure location.
Apparently different SSL/TLS defaults are setup for local versus cloud environments.
https://github.com/Azure/Azure-Functions/issues/482
Once I input this line at the top of my function and published everything got back to working again.
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

Unauthorized Error Bot framework

I have developed a bot using the Microsoft Bot Framework in C#, and am in the process of trying to deploy it to a webserver instead of Azure. The web server runs Windows Server 2012 R2 and has IIS 8.5 installed. The bot works fine locally and can be tested there using the emulator without any problems.
I have configured a site in IIS on the web server for the bot and deployed the bot code there, as well as configured the app ID and password. When using the "test connection" facility on the Bot Framework site, I am given an "Unauthorized" message.
Can anybody advise on where I may be going wrong, or share their experiences with debugging these kinds of errors? Bot Framework does not seem to provide a terribly good debugging experience, unfortunately.
https://chatbot.xxxxxxxxinsight.com/
These are the common issues that users run into:
Your bot’s cloud endpoint URL is not correct. Make sure you have
included the path at the end of the URL (e.g. /api/messages).
Your bot’s endpoint is not HTTPS or is not trusted by the Bot Framework
Channel Emulator. Your bot must have a valid, chain-trusted certificate.
The bot is configured without a Microsoft App Id or a Microsoft App
Password.
Your Microsoft App Id or Microsoft App Password are incorrect.
See the full auth troubleshooting guide here.
If you are still getting Unauthorized error message you should check the follwing
Microsoft App Id and Microsoft App Password in appsettings.json file
in your project folder. (appsettings.json refers to .NET Core Bot
Framework Development)
Check the channels inside your Azure Bot (in Azure Portal), and
check the allowed channels.
This should get your bot in running state. Make sure to pass App ID and Password with the URL in Emulator to connect to your bot.
If you are missing your Microsoft App Password, please comment below.

Error :The security token included in the request is invalid.Response Status Code: ForbiddenError Code: InvalidClientTokenIdError

we designed the WebService application in vs 2010 using AWS SDK toolkit which connect to AWS SNS Service.
It Perfectly works when we directly run from VS 2010 Development studio, but when we publish webservice to Local IIS or dedicated webserver it fails to create topic with following error Messages.
The security token included in the request is invalid.Response Status Code: ForbiddenError Code: InvalidClientTokenIdError
Actually i didn't get how to get security token and where to put the security token in my web application.
Thanks in advance.
Its not possible to run AWS SNS application from local IIS and or existing web service.
if you want to run your web service application on server for outside access, you need to
-Create a profile
-Create an IAM Role for that profile
-Launch an EC2 Instance and Specify the IAM Role.

Categories

Resources