external librarie (DLL) calling web service with TLS 1.2

  • 87 Views
  • Last Post 04 September 2017
psquare posted this 21 August 2017

I have a DLL which calls a web service but we need to implement TLS1.2 which .net framework 3.5 does not natively support but luckily Microsoft supplied a workaround. For some reason when Abbyy calls my DLL it doesn’t work but when I create a console application and call the DLL it works. So does Abbyy create some kind of wrapper around the created DLL?

 To make a point clear the web service call work currently with regular default security settings in .net but we will be rolling out TLS 1.2 shortly so I’m in the testing phase and I thought this would be an easy fix but doesn’t look like it.

 So the fix Microsoft suggested was to add this before the request

System.Net.ServicePointManager.SecurityProtocol = CType(3072, System.Net.SecurityProtocolType)

Order By: Standard | Newest | Votes
Ekaterina posted this 22 August 2017

Hello,

In the "Appendix > Using scripts in ABBYY FlexiCapture > Specifics of scripts written in .Net languages" article you may see that  .Net assemblies should be compiled using Microsoft .Net Framework 3.5 (or earlier). 

Please contact your regional support to find workaround for your situation.

psquare posted this 23 August 2017

This work at the moment with .Net Framework 3.5. It make calls to my web service but it stop working because I implemented TLS 1.2 and I just wanted to know how exactly Abbyy Flexicapture 11 calls the DLL and also is the DLL being called from the verification station or from the processing station.

Ekaterina posted this 31 August 2017

Hello,

Could you please clarify your phrase "when Abbyy calls my DLL it doesn’t work"? How does it appear?

How are links to dll specified in case of a successful and unsuccessful call?

Does FC have access to this dll?

What exactly does this dll do?

Could you send us your project, dll source and your dll?

 

We guess that ddl calls some resource, does not get the answer then the connection closes by timeout and nothing happens.

 

 

psquare posted this 31 August 2017

My DLL is added in the .Net References and then in my workflow I have a customExport stage that initial the DLL as follow:

Dim MyExport As OcrDll.BatchProcessing = New OcrDll.BatchProcessing()
MyExport.CreateCustomExport(Batch, Documents, Processing)
MyExport = Nothing

In that function I do a few processes to check the batch and I also send some info to a webservice and return in case of error information to the user of the verification station and will send the batch to exception. Like I said all this works great at the moment but now that I added these line to activate TLS1.2 it stops working and I can't seem to figure out why. To test I also create a console application and added the same dll in reference and called the same function and it works.

That's why I don't get it because my code works outside of FC but not in FC?

I do not have permission from my superior to share my project as there is a lot of sensitive information but the main function that crashes is simply a call to a web service like so.

System.Net.ServicePointManager.SecurityProtocol = CType(SECURITY_PROTOCOL_TLS12, System.Net.SecurityProtocolType)

Using l_ws As New ServicesOCR.WebServices
    l_ws.Url = p_wsUrl
   
    ' Submit WS call
    l_xmlResponse = l_ws.ServiceRequest(l_xmlRequest)
   
    'rest of the code to process the response
End Using

Help This helps

Ekaterina posted this 01 September 2017

Hello,

To proceed with this issue further we'll need to send the project, demonstrating this behavior, to the ABBYY HQ specialists. If you cannot send us the original project due to the sensitive information, maybe you can create a sample mock-up project that can repeat the same behavior without including sensitive information in it?

We are sorry, but re-creating this issue just by description is out of scope of this forum. You may address this question to the ABBYY regional support, but they will need samples from your side too.

psquare posted this 01 September 2017

Yes I get that but having my project will not make you more able to explain why I cannot call the web service by adding the TLS1.2 because this web service is not accessible to the outside it's an internal web service. As for the mock-up project I can maybe try that but again what web service will you call to test this issues? Also how can I get in contact with my regional support?

Thank you

Ekaterina posted this 04 September 2017

Hello,

To contact regional support fill this form and follow the link https://www.abbyy.com/en-us/support/contacts/

Close