Using C# .NET 4.6.1 with Microsoft.Exchange.WebServices nuget package 2.2.0 connecting to Office 365.
Expected disconnection is set to every 3 minutes.
Error is handled as below:
The OnSubscriptionError event fires with a ServiceResponseException.
"Unable to retrieve events for this subscription. The subscription must be recreated., The events couldn't be read."
I recreate/renew the subscription as suggested by the error.
I then receive one notification but no more.
I have to restart the C# program/service in order to get StreamingSubscriptions working again.
What is the best practice for recreating/renewing the subscription?
Do you know of any other possible causes? - Microsoft themselves have been mainly focused on tweaking the throttling.
Thanks.
Related
I am trying to connect my Soffid 3 server with our custom web application named Schrift. I am using а JSON REST Web Services Connector for this purpose. I added REST Web service plugin and then configured an agent with JSON/XML/SOAP Rest webservice type.
Loading of objects is working fine. My REST connector connects to the web service successfully and gets data of the accounts.
The problem is when I am trying to update some data (for example, I am trying to lock an account), nothing happens. And unfortunately I don't know what should be happening. When should REST connector send updated data to the managed system and in which way? I didn't find any log entries saying that REST connector was trying to update an object on managed system. Maybe I did smth wrong or missed something.
I would appreciate for any help. I can post any conf or log details if you need.
Update#1
(I did some investigation after the first answer)
I checked the agent settings: Read only and Manual account creation are set to no
The account was set to unmanaged type, but I succeeded in changing its type to shared and then to single without getting an error. Now it is set to single
The task queue is empty.
Also I've checked that update method is present and update properties are set correctly. updateParams is not set (it means that all attributes should be sent to the managed system).
But when I change status of the account (from Enable to Disable), nothing happens.
In the console log I can see only these lines
14-Sep-2021 13:26:29.708 INFO [BPM-Scheduler:192.168.7.121:1] com.soffid.iam.bpm.job.JobExecutorThread.run No job to execute
When I manually run the task Analize impact for changes on Schrift, Execution log shows
Changes detected for accounts
=============================
NO CHANGE DETECTED
Changes detected for roles
=============================
NO CHANGE DETECTED
Update#2
After many attempts I made some progress. Now when I make some changes in the account, the task named UpdateAccount baklykov#irf.com.ua#Schrift appears, but runs with an error.
At first it was 415 Unsupported Media Type error as I wrote in comments, but now it looks a little different
Throws exception updating object : Extensible object [type = account]
EmployeeEmail: baklykov#irf.com.ua
IsLockedOut: true (log truncated) ...
caused by Unexpected response, Content-Type: null
Update#3
I found out that soffid's request for updating the object was in improper format (all the parameters were passed in the html request instead of putting them in json body)
After researching I found a method's property called Encoding and set it to application/json value.
Now the parameters are passed in json body (that's what I need), but now the problem is that soffid puts all the parameters in json body, including the key parameter by which the object for updating should be determined. My guess this is the reason why the object in the target system is still not updated.
In other words my application expects a request like this:
https://myapp.mysite.com/api/v1/Soffid/Employees?EmployeeEmail=baklykov%40irf.com.ua :
{"EmployeeLastName":"Baklykov","EmployeeFirstName":"Ivan"}
but Soffid sends this:
https://myapp.mysite.com/api/v1/Soffid/Employees:
{"EmployeeLastName":"Baklykov","EmployeeFirstName":"Ivan","EmployeeEmail":"baklykov#irf.com.ua"}
The system should have created a UpdateAccount task in the task queue. Please, verify:
The task engine is in automatic mode. In read-only or manual mode, no task will be created.
If you are updating an account, check the account is not set as unmanaged. In that case, no tasks is created.
Finally, verify the task queue has not held the task up.
Have you checked the engine mode? Look at Main Menu > Administration > Configure Soffid > Integration engine > Smart engine settings
It should be set to automatic.
I'm developing a connector for Teams, and constantly getting 500 errors in web client during lengthy debugging sessions.
What I usually do are multiple subsequent microsoftTeams.settings.get/setSettings calls, adding/removing sideload package, adding/removing connector from my team, sending messages to Outlook web hooks and so on. Everything is working fine, but after some period of time I start getting errors for currently used connector id as described below. This definitely has something to do with Connectors backend stuff because creating a new team and new connector in Connectors Developer Dashboard usually helps me to proceed.
Example. When I'm sideloading new version of extension, choosing team, then the channel, clicking "Set up", this error pops up in the console and I'm being redirected to Connectors list for a channel.
2018-12-24T15:05:42.342Z Received error from connectors {"seq":1545227948597,"timestamp":1545663941386,"flightSettings":{"Name":"ConnectorFrontEndSettings","AriaSDKToken":"d127f72a3abd41c9b9dd94faca947689-d58285e6-3a68-4cab-a458-37b9d9761d35-7033","SPAEnabled":true,"ClassificationFilterEnabled":true,"ClientRoutingEnabled":true,"EnableYammerGroupOption":true,"EnableFadeMessage":false,"EnableDomainBasedOwaConnectorList":false,"EnableDomainBasedTeamsConnectorList":false,"DevPortalSPAEnabled":true,"ShowHomeNavigationButtonOnConfigurationPage":false},"status":500,"clientType":"SkypeSpaces","connectorType":"Manage","name":"ClientError","nonPIIInfo":"{\"name\":\"Install app id lookup failure f0e3cf15-cef0-48f1-bf75-25785bf62c63\"}"}
My connector is present in the bottom of the list and I can access its config page, but cannot save the configuration - getting empty 500 error ("{\"exception\":{}}"). Expected behavior - sideload, choose team, choose channel, "Set up", redirect to a connector configuration page, save configuration.
When I'm clicking on my sideloaded connector in this list I'm getting another error:
"TypeError: Cannot read property 'ConfigurationsVisible' of undefined\",\"stack\":\"TypeError: Cannot read property 'ConfigurationsVisible' of undefined\\n at p.ConfigurationsCtrl.n.toggleConfigurationDetails (https://outlook.office.com/connectors/Static/app.min.js?v=16.01.1362.003:1:57930)\\n at fn (eval at compile (https://outlook.office.com/connectors/Static/vendor.min.js?v=16.01.1362.003:6:124257), <anonymous>:4:698)\\n at t (https://outlook.office.com/connectors/Static/vendor.min.js?v=16.01.1362.003:6:67388)\\n at u (https://outlook.office.com/connectors/Static/vendor.min.js?v=16.01.1362.003:6:143542)\\n at p.$eval (https://outlook.office.com/connectors/Static/vendor.min.js?v=16.01.1362.003:6:77312)\\n at p.$apply (https://outlook.office.com/connectors/Static/vendor.min.js?v=16.01.1362.003:6:77546)\\n at HTMLDivElement.<anonymous> (https://outlook.office.com/connectors/Static/vendor.min.js?v=16.01.1362.003:6:143594)\\n at HTMLDivElement.dispatch (https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.1.min.js:3:28337)\\n at HTMLDivElement.v.handle (https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.1.min.js:3:25042)\"}"}
Is there any way to troubleshoot/"reset" connector other than deleting and recreating it from scratch? My latest connector id that has this issue is 1b263a28-4d0f-45bd-8f76-da573f11bd6e.
p.s. I also suspect connector settings are cached somewhere, because today I've changed connector configuration url in code, manifests and Connectors Dashboard, but it was still hitting to the "old" route. Switching to another connector id from list helped.
UPDATE
The "faulty" connector also causes another 500 error when trying to remove it from the channel (right after 'Remove' click in configuration tab):
2018-12-25T16:45:56.300Z Received error from connectors {"seq":1545227949598,"timestamp":1545756356278,"flightSettings":{"Name":"ConnectorFrontEndSettings","AriaSDKToken":"d127f72a3abd41c9b9dd94faca947689-d58285e6-3a68-4cab-a458-37b9d9761d35-7033","SPAEnabled":true,"ClassificationFilterEnabled":true,"ClientRoutingEnabled":true,"EnableYammerGroupOption":true,"EnableFadeMessage":false,"EnableDomainBasedOwaConnectorList":false,"EnableDomainBasedTeamsConnectorList":false,"DevPortalSPAEnabled":true,"ShowHomeNavigationButtonOnConfigurationPage":false},"status":500,"clientType":"SkypeSpaces","connectorType":"Manage","name":"ClientError","nonPIIInfo":"{\"name\":\"Error: [$rootScope:inprog] $digest already in progress\\nhttp://errors.angularjs.org/1.5.0/$rootScope/inprog?p0=%24digest\",\"stack\":\"Error: [$rootScope:inprog] $digest already in progress\\nhttp://errors.angularjs.org/1.5.0/$rootScope/inprog?p0=%24digest\\n at https://outlook.office.com/connectors/Static/vendor.min.js?v=16.01.1362.003:6:3340\\n at nt (https://outlook.office.com/connectors/Static/vendor.min.js?v=16.01.1362.003:6:73371)\\n at p.$digest (https://outlook.office.com/connectors/Static/vendor.min.js?v=16.01.1362.003:6:75654)\\n at p.$apply (https://outlook.office.com/connectors/Static/vendor.min.js?v=16.01.1362.003:6:77596)\\n at HTMLDocument.<anonymous> (https://outlook.office.com/connectors/Static/app.min.js?v=16.01.1362.003:1:59080)\\n at HTMLDocument.dispatch (https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.1.min.js:3:28337)\\n at HTMLDocument.v.handle (https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.1.min.js:3:25042)\\n at Object.trigger (https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.1.min.js:3:27423)\\n at Object.simulate (https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.1.min.js:3:30815)\\n at HTMLDocument.r (https://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.1.min.js:4:1788)\"}"}
After that I click 'Remove' in the popup, web client freezes and returns to connector list without refresh. My connector is still listed there as if it was not removed (it actually did).
I am having troubles with the resetAuth() function. I implemented it roughly like this example, but I have no idea when it is being called. Adding a console output and observing the Stackdriver Log tells me that this function is never being called during what I would call a normal workflow.
The documentation is weirdly brief and is missing this part about why I need to implement it and when it is being called. Do I need to call resetAuth() manually on some point? Is there a button somewhere that calls this function?
I'm using the AuthType USER_PASS by the way and everything else seems to work just fine after some investigation and debugging.
I found this document called Community Connectors Developer Launch where, among other things, the following it listed (as of 2018-07-30):
What's next: Upcoming changes and improvements
Some of the features and improvements we'll be working on in the
coming months include:
Configuration and Authentication
Capability to execute the resetAuth function of community connectors from within Data Studio.
Does this mean that calling resetAuth() is currently not yet implemented?
resetAuth is called when the user revokes access to the connector via the https://datastudio.google.com/datasources/create endpoint.
There was a bug that caused this function to not be called for certain auth types, but it has been resolved.
I have a rather complex and large database with about 3000+ objects (tables/triggers/sps combined). I inherited this DB and restructuring it is probably 3-4 years away.
meanwhile, I need to implement a pub sub feature for any insert/update/delete on these tables. Given number of tables and existing queries probably query notification (and SQL Dependency) will not work. What I am looking for is a way to push the changes (what changed in table - like records PK and table name) on the service broker so I can use external activator to then retrieve change,and then use my custom pub sub from that point onwards.
I have pretty much all the ducks lined up except for the way to push change notification on service broker.
Any help/pointers are appreciated.
Thanks.
N M
PS. I did look around for similar postings and did come across a few however, MSDN articles they referred to seem to have all removed - not sure what's going on on MSDN site.
For external activator look at Microsoft SQL Server 2008 Feature Pack- "Microsoft SQL Server 2008 R2 Service Broker External Activator".
For console application (that processes messages) great idea is to drop an eye in codeplex. There is good examples.
To put event notification (notifications, that will be used by external activator service) code looks something like this:
Create Queue ExternalActivatorQueue;
Create Service ExternalActivatorService On Queue ExternalActivatorQueue
([http://schemas.microsoft.com/SQL/Notifications/PostEventNotification])
Create Event Notification NotifyExternalActivator
On Queue dbo.ProcessQueue
For QUEUE_ACTIVATION
To Service 'ExternalActivatorService', 'current database'
To send message in the queue:
Declare #h UniqueIdentifier;
Declare #x xml = '<tag/>';
Begin Dialog Conversation #h
From Service MyTableService
To Service 'ProcessService'
With Encryption = OFF;
Send On Conversation #h(#x)
All steps i done to make it work is here, but just in Latvian :). There actually is almost what you need (trigger that sends messages when data are inserted in table..).
I want to execute a job when ever a file is dropped into a particular folder.
I found some articles that showed me how I can do it on SQL Server.
I created a alert type: WMI Event Alert
For the name space its the SQL instance which comes automatically as \\.\root\Microsoft\SqlServer\ServerEvents\MSSQLSERVER
On the Query section - I wrote the below query ,
SELECT *
FROM __InstanceCreationEvent
WITHIN 1
WHERE TargetInstance ISA 'CIM_DataFile'
AND TargetInstance.Name = ‘c:\\TestFolder\’ `
The error message returned is:
Cannot create new alert.
ADDITIONAL INFORMATION:
Create failed for Alert 'AlertTest'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.2425.0+((KJ_PCU_Main).110406-2044+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+Alert&LinkId=20476
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
SQLServerAgent Error: WMI error: 0x80041058
The #wmi_query could not be executed in the #wmi_namespace provided. Verify that an event class selected in the query exists in the namespace and that the query has the correct syntax. (Microsoft SQL Server, Error: 22022)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.2425&EvtSrc=MSSQLServer&EvtID=22022&LinkId=20476
Please may you advise if my Query is correct and if there is anything else I need to check?
Thanks a lot in advance.
You are using the wrong namespace, the CIM_DataFile WMI class is part of the \root\CIMV2 namespace and not of \root\Microsoft\SqlServer\ServerEvents\MSSQLSERVER
In this case, the answer from RRUZ is correct. However there are other possible causes of this error message:
The #wmi_query could not be executed in the #wmi_namespace provided.
One possible reason is the account that runs the Windows service "Windows Management Instrumentation" is disabled as a SQL login. (If you are running SQL 2012+, look for the login 'NT SERVICE\winmgmt').
(Source: Blog by 'rahmanagoro' )
Edit 2020-05-29: I've made a more comprehensive answer to this question on the DBA forum.
Another possible fix is to restart the "Windows Management Instrumentation" service. No idea what leads to the problem, but restarting the service fixes it. I've seen this twice, both times on Windows Server 2008 R2 Standard Edition x64.
Edit 2020-05-29: I've made a more comprehensive answer to this question on the DBA forum.