Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

EasyDaClient - WCF - The type initializer threw an exception

More
01 Apr 2020 17:17 #8342 by support
Please check your target directory whether it contains following assemblies:
- App_Web_OpcLabs.EasyOpcClassicRaw.amd64.dll
- App_Web_OpcLabs.EasyOpcClassicRaw.x86.dll

If not, copy them over from QuickOPC installation (under Assemblies\net47). Visual Studio sometimes forgets to copy them.

Best regards

Please Log in or Create an account to join the conversation.

  • Math
  • Topic Author
  • Visitor
  • Visitor
01 Apr 2020 12:41 #8338 by Math
Hi,

I dont have any issue using the EasyDaClient with a Winform.

When I use the EasyDaClient within a WCF service I get this error:

The type initializer for 'OpcLabs.EasyOpc.DataAccess.EasyDAClient' threw an exception.

Here's my code:

Imports System.ServiceModel
Imports System.ServiceModel.Activation
Imports System.ServiceModel.Web
Imports OpcLabs.EasyOpc.DataAccess


<ServiceContract(Namespace:="")>
<AspNetCompatibilityRequirements(RequirementsMode:=AspNetCompatibilityRequirementsMode.Allowed)>
Public Class WCFQuickOPCAjax


<OperationContract()>
Public Function Test() As String
Try
Dim Client As New EasyDAClient

Return "test"
Catch ex As Exception
Return ex.Message.ToString
End Try

End Function
End Class

I someone could help me I would be happy as a clam in high water!

Many thanks,

Mathieu

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.148 seconds