I started learning bot framework last week, and i decided to start off with the default bot project that returns your input and its number of character. But unfortunately, I couldn't test the bot application in bot emulator. It can't just send my input. It displays "couldn't send" whenever I forward an input.
My endpoint url which is http://localhost:3979/api/messages/ is correctly written there.
What could be wrong? I'm just a starter in bot framework and bot building.
As I'm not aware of the exact code which you are trying to execute, I'd suggest few points to be checked again.
Checkpoints:
Make sure you are running the code in debug mode with any browser (Edge, chrome, explorer etc.) and then run in the emulator.
Configure or link the emulator with ngrok. (Though it is not required when running locally but it may resolve if the emulator is not working with firewall issues)
Please check the Microsoft App Id and Microsoft App Password are the same in emulator and Web.config file.
Try with blank Microsoft App Id and Microsoft App Password in both Web.config file and emulator.
Check if the endpoints on the browser and emulator are the same
If you are encountering other errors like 401, 405, 500 please check this article.
In case if all the check points are right and you are still encountering an issue while running the code in emulator, there might be an issue with the code or reference libraries. You can also check the working example.
Check your visual studio .bot file. It should be like this.......
{
"name": "EmulatorBot",
"description": "",
"services": [
{
"type": "endpoint",[enter image description here][1]
"endpoint": "http://localhost:3978/api/messages",
"name": "EmulatorBot20181123022900",
"id": "25"
}
],
"padlock": "",
"version": "2.0",
"path": "C:\\Users\\suraj.tiwari\\Desktop\\Bot NK\\EmulatorBot\\EmulatorBot.bot",
"overrides": null
}
Add an Endpoint for your bot
Endpoint url : http://localhost:3978/api/messages
Name : EmulatorBot20181123022900
Related
I am trying to use couchbase for online and offline database in my xamarin application .
the offline part is working good , but it doesn't sync .
I followed this tutorial :
https://docs.couchbase.com/userprofile-couchbase-mobile/sync/userprofile/xamarin/userprofile_sync.html
I have installed couchbase server , I created a bucket named : userprofile , and a user and I have enabled the Application Access and Read Only Admin roles.
also I installed sync gateway and I have configured it ,
here is my configuration .json file
{
"log": ["*"],
"databases": {
"userprofile": {
"server": "http://127.0.0.1:8091",
"bucket": "user-profile",
"username": "Maria",
"password": "123456",
"enable_shared_bucket_access": true,
"import_docs": true,
"num_index_replicas": 0,
"delta_sync" :{"enabled":true},
"users": {
"Maria": { "password": "123456"},
"GUEST": { "disabled": false, "admin_channels": ["*"] }
},
"sync": `function (doc, oldDoc) {
if (doc.sdk) {
channel(doc.sdk);
}
}`
}
}
}
and I used this command to configure the sync gateway :
C:\Program Files\Couchbase\Sync Gateway\sync_gateway sync-gateway-config-userprofile-walrus.json
also I have changed the sync url to ws://10.0.2.2:4984 because I am using android emulator .
but it did not sync between devices , can anyone help me please ?
1) How are you verifying if the sync is working (what steps did you follow for testing)? If you are following the instructions here, that won't work with the config you have above. Because the only valid user that you have configured in your config file is the one with credentials "username" and "password" and the steps in tutorial indicates a different username/password. So make sure you log into your app with the credentials you have in your config file and try out
2) You indicated that you have a Couchbase Server running that you have configured for Sync Gateway access. But your config file indicates that you are using "walrus" mode (Walrus mode is a memory only mode intended only for dev/test purposes). In other words, in walrus mode, you are not pointing to an actual couchbase server.
If you want to sync with a backend Couchbase Server(which you should), then replace the "walrus:" in the "server" property in the config file to point to the couchbase server.
3) The best resource to troubleshoot is the Sync Gateway logs. That should give sufficient hints as to what is going wrong with the sync. Post the errors you are seeing if any if the above tips don't work
4) Check out this tutorial for relevant background. Probably from this point
Is there a way to control which version of a particular application from the play store should be installed on the fully managed device using Android Management API?
Example - Install Version 1.0, 2.0 based on what the Admin decides.
Can something be done with ApplicationPolicy and control the application versions, updates from the policy of the device?
{
"packageName": string,
"installType": enum(InstallType),
"lockTaskAllowed": boolean,
"defaultPermissionPolicy": enum(PermissionPolicy),
"permissionGrants": [
{
object(PermissionGrant)
}
],
"managedConfiguration": {
object
},
"disabled": boolean,
"minimumVersionCode": number,
"delegatedScopes": [
enum(DelegatedScope)
],
"managedConfigurationTemplate": {
object(ManagedConfigurationTemplate)
}
}
At the moment I don't believe this is possible. I believe even for Android Management API it still obeys the rules of Google Play where the user is given the latest version.
--- edit
I've just thought of a hack which might make this possible. Eseentially you could give every version of the app a different package name in your build tool, then use admin based targeting to choose which package names are available. It's a bit of a hack, and I probably wouldn't recommend it, but it might be the only way to do what you want.
I'm trying to connect Visual Studio C# code with a Cassandra server
The code works fine in localhost, but I want to connect code to make the change directly on the server. I found instructions to edit a cassandra.ymal file like
listen_address
or
start_rpc
or
rpc_address
Note:
I open a Firewall on a specific port like 9042
I used telnet command to test IP and port is open
I found the solution, i searched a lot, so i found this, that help me, hope it will help others.
1 ) Install Cassandra Workbench
2 ) Update .cassandraWorkbench.jsonc like below snippet
//PasswordAuthenticator
{
"name": "Cluster PasswordAuthenticator", // auth methods
"contactPoints": ["xxx.xxx.xx.x", "xxx.xxx.xx.x"], // seed_provider -> seeds from your cassandra.yml
"hosts": ["xxx.xxx.xx.x"], // your host address
"authProvider": {
"class": "PasswordAuthenticator",
"username": "abc", // host username
"password": "****" // host password
}
}
I was trying to run this github bot framework sample but I am getting error.
I have configured Bot on Bot Framework Portal, add botID, AppID, AppPwd in web.config, enabled Directline, configured ngrok.
As soon as I am opening index.html page I am getting following error.
JavaScript critical error at line 83, column 32 in
http://localhost:3979/agentdashboard/index.html?s=DIRECTLINEKEY\n\nSCRIPT1002:
Syntax error
Any idea whats wrong?
JavaScript critical error at line 83, column 32 in http://localhost:3979/agentdashboard/index.html?s=DIRECTLINEKEY\n\nSCRIPT1002: Syntax error
I checked the JavaScript code written in index.html, and I find that the arrow function expression are used. Such as:
const connect = () => {
var name;
if(!connected)
name = "connect"
else
name = "disconnect"
botConnection
.postActivity({type: "event", value: "", from: user, name: name})
.subscribe(connectionSuccess);
};
If you are using the browser that does not support it, which will cause Syntax error.
Same error in Internet Explorer:
Please refer to Browser compatibility of Arrow functions, and browse index.html in the browser that supports arrow function expression to check if it works for you.
I have to develop an exe application that replace the default search engine of Google Chrome and set my private search engine of Google Chrome after installing on that exe.
Preferences are saved within Preferences file in C:\Users\##UserName##\AppData\Local\Google\Chrome\User Data\Default.
That's a JSON file. You should look for following part of the file:
"default_search_provider": {
"alternate_urls": [ "{google:baseURL}#q={searchTerms}", "{google:baseURL}search#q={searchTerms}", "{google:baseURL}webhp#q={searchTerms}" ],
"enabled": true,
"encodings": "UTF-8",
"icon_url": "http://www.google.com/favicon.ico",
"id": "2",
"image_url": "{google:baseURL}searchbyimage/upload",
"image_url_post_params": "encoded_image={google:imageThumbnail},image_url={google:imageURL},sbisrc={google:imageSearchSource},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight}",
"instant_url": "{google:baseURL}webhp?sourceid=chrome-instant&{google:RLZ}{google:forceInstantResults}{google:instantExtendedEnabledParameter}{google:ntpIsThemedParameter}{google:omniboxStartMarginParameter}ie={inputEncoding}",
"instant_url_post_params": "",
"keyword": "google.com",
"name": "Google",
"new_tab_url": "{google:baseURL}_/chrome/newtab?{google:RLZ}{google:instantExtendedEnabledParameter}{google:ntpIsThemedParameter}ie={inputEncoding}",
"prepopulate_id": "1",
"search_terms_replacement_key": "espv",
"search_url": "{google:baseURL}search?q={searchTerms}&{google:RLZ}{google:originalQueryForSuggestion}{google:assistedQueryStats}{google:searchFieldtrialParameter}{google:bookmarkBarPinned}{google:searchClient}{google:sourceId}{google:instantExtendedEnabledParameter}{google:omniboxStartMarginParameter}ie={inputEncoding}",
"search_url_post_params": "",
"suggest_url": "{google:baseSuggestURL}search?{google:searchFieldtrialParameter}client={google:suggestClient}&xssi=t&q={searchTerms}&{google:cursorPosition}{google:zeroPrefixUrl}{google:pageClassification}sugkey={google:suggestAPIKeyParameter}",
"suggest_url_post_params": "",
"synced_guid": "CE1B8BFD-412B-4AB3-B597-325B07CA7E76"
},
I have no idea how will browser react if you change that file from outside the browser! It's possible that it will be synced back into version stored in cloud when user decided to sync Chrome settings between different machines using Google Account.
I don't think there is an API for doing this via JavaScript or else.
However, this might possible by using the SQLite data file and editing it.
The file on typical Windows 7 can be found at:
C:\Users\ABC\AppData\Local\Google\Chrome\User Data\Default and file is named as 'Web Data'.
To add a search engine, add an entry to the 'keywords' table.
To change the default search engine, edit the 'Default Search Provider ID' value inside the 'meta' table.
Note: This method is not officially supported and you may mess up chrome settings.
Courtesy: Setting the Default Search Provider on Chrome via a script