Dynamics 365 F&O fails to work with upgrade to new Azure Cognitive Search functionality - azure-cognitive-search

We have our own logic written to be able to transfer data to use in Azure Search. Before we were using the Microsoft.Azure.Search dll’s in X++ (F&O) but as these got deprecated, and we need to connect to Government Cloud, we had to do an upgrade (see https://learn.microsoft.com/en-us/azure/search/search-dotnet-sdk-migration-version-11)
 Old dll’s used in the bin-folder of our model in F&O:
New dll’s that are referenced after the upgrade:
When we unit test this using a console app in .Net, everything seems to work. The issue persist when we put these dll’s in the bin folder of F&O, and we do a call to this functionality we retrieve following error message:
We already tried to figure out if correct versions of the referenced dll’s are used, but this seems to be fine.
Tried to get information by tweaking the output to get the referenced assemblies:
 
Looking into the used dll’s in the debug folder of our console app this seems to be the correct ones:
 
Anyone had the same problem and ideally have a solution?
We tried creating a console app to have the exact same input as used from F&O, but in the console app it works without any issues.
We expect it to work when called from within F&O

Related

Azure logic app - Transform to XML - MapNotReady

I'm trying to translate an X12 edi message using a map created in VS2015, but I get the following error;
MapNotReady. The map '' is still being processed. Please try again later.
Running the input in VS2015 I get the correct result, but not using Azure Logic Apps
Resolved this issue by creating a new Integration account in a new Resource Group and different Location.
Looks like a bug in Azure, will log call with MS
I faced the same issue after deploying a logic app using ARM template.
What was I doing?
In deploy powershell, I was creating integration account and adding schemas and maps.
Deploying logic app using ARM template.
Immediately after deployment, I tried to execute the logic app. At that point, I received MapNotReady exception in transform action.
However after 10 minutes when I retried the message again, the problem was gone. It looks like, map service was not fully deployed.
So no need to deploy to different resource group. Probably wait for few minutes before executing LogicApps.

appengine.google.com & objectify - working ok locally but not on gae?

I am developing a backend using Android Studio and Java.
I use objectify to manipulate entities in Google's Datastore.
The question is the following: everything works ok locally. I can call any of the endpoint and add, update and delete entities. However, anything to do with the same entities do not seem to work on GAE... Is there anything specific required for this to work?
Logs are fairly limited also but it appears all endpoints register properly.
The only thing meaningful out of the GAE and logs section is for return calls being set to 200 but nothing more....
Thoughts? Thanks.
I was looking at the google public issue tracker and saw your code posted there (I am also editing your answer to add said code). I can't help but notice that in your "test.html", you load the function from "localhost:8080". This will obviously break your code whenever you're using it on a client's machine, because it will try to load the function from HIS localhost, which won't have your function in it.
When you're running your code on your production server, you would need to use something like "your-end-point.your-application.appspot.com" to get your function.
Also, I think that you can ONLY pass around either JSON or "JavaBeans" object. And it seems the "Test" you are passing isn't a JavaBeans (it has a constructor with at least a parameter).
The fact it never loads the function properly could also explain why your Logs don't show.

Access Sitecore DB from API in Console application

I would like to accesss the sitecore DB and items from console application like
Sitecore.Data.Database db = Sitecore.Context.Database
or
Sitecore.Data.Database db = Sitecore.Data.Database.GetDatabase("master")
how do I configure and setup my console application to access the DB as above?
Thanks Everyone for the suggestion, I am really interested in config changes, I used webservice, but it has very limited methods. For example, if I would like create an Item with the template and insert the item with prepopulated value, there is no such option. The reason I am looking for the console apporach is I would like to import the contents from XML or excel sheet and push those to the sitecore tree, eventually use the scheduled task to run the console app periodically. I do not want to copy the entire web.config and app_config. If anyone has already done this, could you please post your steps and necessary config changes?
You have two options I think:
1) Import the Sitecore bits of a website's web.config into your console application's app.config, so that the Sitecore API "just works"
I'm sure I read a blog post about this, but I can't find the reference right now. (I will have another look) But I think the simple but long winded approach is to copy all of the <sitecore/> element and all the separate files it references. I'm fairly sure you can whittle this down to a subset of the config required for data access with a bit of thinking.
2) Don't use the Sitecore API directly, connect to a web service that exposes access to it remotely.
There are a few of these that already exist. Sitecore itself exposes one, Sitecore Rocks has one, and Hedgehog TDS has one too. And you can always write your own (since any web service running inside the Sitecore ASP.Net app can make database calls and report values back and forth - just remember to consider security if this web service might end up exposed externally for any reason)
John West links to some relevant stuff here:
http://www.sitecore.net/Learn/Blogs/Technical-Blogs/John-West-Sitecore-Blog/Posts/2013/09/Getting-Data-Out-of-the-Sitecore-ASPNET-CMS.aspx
-- Edited to add --
I've not found the blog post I remember. But I came across this SO thread:
Accessing Sitecore API from a CLI tool
which refers to this blog post:
http://www.experimentsincode.com/?p=232
which I think gives the info you'll need for option 1.
(And it reminds me that, of course, when you copy the config stuff you have to copy the Sitecore binaries into your app's folder as well)
I would just like to expand on #JermDavis' post and note that Sitecore isn't a big fan of being accessed when not in a web application. However, if you still want to do this, you will need to make sure that you have all of the necessary configuration settings from the web.config and App_Config of your site in your console application's app.config file.
Moreover, you will never be able to call Sitecore.Context in a console application, as the Sitecore Context sits on top of the HttpContext which means that it must be an application and have a valid request for you to use it. What you are looking for is something more along the lines of Sitecore.Configuration.Factory.GetDatabase("master").
Good luck and happy coding :)
This sounds like a job for the Sitecore Item Web API. I use the Sitecore Item Web API whenever I need to access Sitecore data from the master database outside the context of the Content Management server or outside of the context of the Sitecore application. The Web API definitely does not allow you to do everything that the standard Sitecore API does but it can act as a good base and I now extend upon the Web API instead of writing my own custom web services whenever possible.
Thanks to JemDavis's advise.
After I copied the configuration and made changes to config section to get rid of conflicts. I copied almost all of Sitrecore, analytics and lucene dlls, it worked great.
Only thing you have to remember is, copy the app_config folder to the same location where your dlls are.
Thanks again JemDavis....

Problems using Twitter4j on GAE throws 401 just after deploy

Well, I'm having a weird error here:
I'm developing one GAE app to read some Twitter Data, and after read a lot of docs, I have it working on my test server (Running on my pc) but after deploy and test on the real (my appspot domain) it shows this message:
401:Authentication credentials (https://dev.twitter.com/pages/auth) were missing or >incorrect. Ensure that you have set valid consumer key/secret, access token/secret, and the >system clock is in sync.
message - Could not authenticate you
code - 32
I've tried to recreate my OAuthAppToken and OAuthAppTokenSecret keys, even changing the permissions to "Write, Read and Direct Messages" and even assingning one Callback URL but nothing seems to work...
I've tried using twitter4j.properties OR using setOAuthConsumer(TW_CONSUMER_KEY, TW_CONSUMER_SECRET) OR a ConfigurationBuilder whith the correct constants and I'm experimenting the same Issue.
I'm working with AppEngine 1.8.3 and Twitter4j 3.0.4
Iv'e been writing on log and the Twitter object seems to be well created... I dont understand why is working on my PC but not on the real app.
On some other post someone says that could be because it needs to use Sync clock.. but he doesn't explains where to change that property...
Did someone had a clue?
Ok, the problem was me (and Twitter.... well..... I really think it was Twitter problem for being so dark on his api messages)...
On testing server I was looking for an existing account and on the cloud I was looking for an inexistent one. So, It was my mistake. But seriously, what about Twitter saying: "Access Forbidden"? That doesn't have any sense...

WCF - WSDL not updating when publishing service

I added a DataContract to my service and tried updating the service reference to get access to that DataContract. But it never showed up in the intellisense. I cleaned and built the project and then updated the service reference, but it still didn't work.
I then published it to the server and updated the service reference so it would point to the server, but I get the same thing. I browsed the service through IIS and opened my service in the browser.
I clicked the top link that had Service.svc?wsdl to see if my DataContract was there. An old MessageContract was there, but the DataContract was not.
Any ideas on what I'm doing wrong here?
Delete the currently deployed service binaries and verify that the service is inaccessible. Then deploy the new service binaries. This is to verify you're actually deploying to the correct location.
It is also possible that the service binaries aren't being rebuilt. To verify this, delete your bin folder (located next to your project file generally) and issue a rebuild, then follow the first steps.
I got my answer from here.
Only the types actually used by the service will be reflected in the metadata.
I didn't have an operation contract that used the DataContract. I didn't need to have one at the time, so I didn't make it. But apparently, unless you have one that uses it, the metadata won't be generated for that DataContract.

Resources