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.

My Windows Service hosted WCF application not woking in Intel 64 bit environment

More
03 Oct 2024 13:47 #13201 by SZL
Thank you, now its working fine!

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

More
03 Oct 2024 11:12 #13200 by support
Hello,

please do this first, there is a chance the problem is caused by a library we are using: kb.opclabs.com/How_to_disable_prerequisites_boxing .

Best regards

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

More
03 Oct 2024 10:34 #13199 by SZL
I created a simple Winforms application for testing, but result is same. With AMD CPU works fine, with Intel CPU its crashing. Thank you!

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

More
03 Oct 2024 09:54 #13198 by SZL
Hello,

I develop a Windows Service hosted WCF service. Its working fine in debug mode from Visual studio, working fine on a Hyper-V virtual machine with AM64 system, but not working in Production environment with 64 bit Intel CPU. The debugging options are limited in production evironment so I can send only eventlog error messages based on the cases I tested. I built the app in x64, x86 and AnyCPU editions and I copy the App_Web_OpcLabs.EasyOpcClassicRaw.amd64.dll and App_Web_OpcLabs.EasyOpcClassicRaw.x86.dll into the main app folder in every combination, but neither works in this environment. Here are the cases:

Service built as 64 bit:
===========================
In production environment with Intel 64 bit CPU:

Service not starting, with/without App_Web_OpcLabs.EasyOpcClassicRaw.amd64.dll and App_Web_OpcLabs.EasyOpcClassicRaw.x86.dll placed in main app folder:

Service cannot be started. System.BadImageFormatException: Could not load file or assembly 'WCFService, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
File name: 'WCFService, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null'
at .WINSERVICE.WindowsService1.OnStart(String[] args)
at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)

=== Pre-bind state information ===
LOG: DisplayName = WCFService, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/KONsys/ WCF Service/
LOG: Initial PrivatePath = NULL
Calling assembly : WindowsService, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files (x86)\KONsys\ WCF Service\WindowsService.exe.Config
LOG: Using host configuration file:
LO...


Service built as 32 bit (x86)
===========================
In production environment with Intel 64 bit CPU:

CASE [1]:
App_Web_OpcLabs.EasyOpcClassicRaw.amd64.dll and App_Web_OpcLabs.EasyOpcClassicRaw.x86.dll placed in main app folder:
Service stopping and 404 error.

Faulting application name: WindowsService.exe, version: 2.0.1.0, time stamp: 0x66fe5e8a
Faulting module name: ntdll.dll, version: 10.0.20348.2694, time stamp: 0xd7baa515
Exception code: 0xc0000374
Fault offset: 0x000e9459
Faulting process id: 0x40c
Faulting application start time: 0x01db15764989e064
Faulting application path: C:\Program Files (x86)\KONsys\ WCF Service\WindowsService.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: 9e675e0d-6147-4156-b660-ce12c03fc9cf
Faulting package full name:
Faulting package-relative application ID:

CASE [2]:
App_Web_OpcLabs.EasyOpcClassicRaw.x86.dll placed in main app folder:
Service stopping and "Error: Failure when receiving data from the peer" error.

Faulting application name: WindowsService.exe, version: 2.0.1.0, time stamp: 0x66fe5e8a
Faulting module name: ntdll.dll, version: 10.0.20348.2694, time stamp: 0xd7baa515
Exception code: 0xc0000374
Fault offset: 0x000e9459
Faulting process id: 0x1e2c
Faulting application start time: 0x01db157628be724a
Faulting application path: C:\Program Files (x86)\KONsys\ WCF Service\WindowsService.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: 9bf4b7a4-ecd6-4d3a-8382-559ea91209c6
Faulting package full name:
Faulting package-relative application ID:

CASE [3]:
App_Web_OpcLabs.EasyOpcClassicRaw.amd64.dll placed in main app folder:
Service working but when try write OPC tag it throws exception: "Object reference not set to an instance of an object.
at WCFSERVICE.SINGLETONS.OpcLoggingSingleton.WriteItemsToOPC(Dictionary`2 tagsData)
at WCFSERVICE.Service1.ProcessPlainTextRequest(Stream Request)"


Service built as AnyCPU bit
===========================
In production environment with Intel 64 bit CPU:

CASE [1]:
App_Web_OpcLabs.EasyOpcClassicRaw.amd64.dll and App_Web_OpcLabs.EasyOpcClassicRaw.x86.dll placed in main app folder:
Service stopping and 404 error.

Faulting application name: WindowsService.exe, version: 2.0.1.0, time stamp: 0x66fe6433
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x06976040
Faulting process id: 0x20c0
Faulting application start time: 0x01db1577269cd2bf
Faulting application path: C:\Program Files (x86)\KONsys\ WCF Service\WindowsService.exe
Faulting module path: unknown
Report Id: 62d12a29-8648-4d68-911e-dbd80fc24a4c
Faulting package full name:
Faulting package-relative application ID:

CASE [2]:
App_Web_OpcLabs.EasyOpcClassicRaw.x86.dll placed in main app folder:
Service stopping and "Error: Failure when receiving data from the peer" error.

Faulting application name: WindowsService.exe, version: 2.0.1.0, time stamp: 0x66fe6433
Faulting module name: ntdll.dll, version: 10.0.20348.2694, time stamp: 0xd7baa515
Exception code: 0xc0000374
Fault offset: 0x000e9459
Faulting process id: 0x1dd4
Faulting application start time: 0x01db15776448b7d3
Faulting application path: C:\Program Files (x86)\KONsys\ WCF Service\WindowsService.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: 5611aa70-a289-412b-9aea-5f914673660d
Faulting package full name:
Faulting package-relative application ID:

CASE [3]:
App_Web_OpcLabs.EasyOpcClassicRaw.amd64.dll placed in main app folder:
Service working but when try write OPC tag it throws exception: "Object reference not set to an instance of an object.
at .WCFSERVICE.SINGLETONS.OpcLoggingSingleton.WriteItemsToOPC(Dictionary`2 tagsData)
at .WCFSERVICE.Service1.ProcessPlainTextRequest(Stream Request)



The AnyCPU (CASE [1]) works fine with AMD 64 bit CPU. Why not working with Intel 64 bit CPU?

Thank you for help!

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

Moderators: support
Time to create page: 0.069 seconds