Ask our Experts
Didn't find what you are looking for? Ask our experts!
Schneider Electric support forum about SmartConnector applications for integration of other building management systems (BMS) into EcoStruxure Building Operation.
Search in
Posted: 2018-06-29 12:09 AM
Link copied. Please paste this link to share this article on your social media post.
A SmartConnector on site is having issues as it isn't updating it's EWS Values. The log is filled with the HTTP Listener receiving XML but then it's unable to update the values due to the Error:
2018-06-20 03:19:26.7367,Error,Processor,<no principal>,Specific Error The operation cannot be completed because the DbContext has been disposed.,
This connector has been running successfully for 6 months and now the log is being filled with this error even after a restart, it's version 2.3.117 of the Framework.
Any ideas of the cause?
Thanks
Link copied. Please paste this link to share this article on your social media post.
All DB access in SmartConnector is based on Entity Framework. EF caches extensively and it is possible for your context to have "stale" data if you keep it open for extended periods of time. Create the DbContext when you need it, read/write as needed, and then dispose of it. That is the recommended usage pattern. This is true even if you are in an ILongRunningProcessor.
You’ve reached the end of your document
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.