Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

215
Visualizações
Call Web Service From VB6 via .NET failing

I have a strange situation and I was wondering if anyone can help.

I have a .NET DLL that is called from a VB6 application. I have extended this DLL to interface with a 3rd party web site. The 3rd party have a SDK which I'm using within my DLL. The SDK has a call to connect to the website which then performs OAuth2 authentication in order to obtain an access token for further calls to the web site.

When the DLL 'authorise' function is called (which contains the SDK Connect function call) from my test harness (also a .NET application) then everything is fine and works exactly as expected.

However, when the same DLL 'authorise' function is called from the VB6 application, the SDK's Connect function fails. The only useful information is the error is a 501 error.

In order to clarify things for me, I changed my DLL to make do the authentication using REST calls. Again, calling this from the .NET test harness all was well but calling from the VB6 application resulted in an error. After investigation it seemed that the error was related to TLS. I forced the DLL 'authorise' function to use TLS1.2, using ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 and the REST calls then worked.

So, for some reason it appears that when making the calls to the DLL from VB6, web calls from the DLL are using a lower version of TLS. Has anyone else seen this before?

I've found some articles regarding disabling TLS1.0 and 1.1 but none of this seems to have worked. Does anyone have any ideas?

Thank you in advance

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I've found what the solution once, so in case anyone else stumbles on this in the future.

When running a VB6 application that references a .NET DLL, it seems that you should still have a .config file for that VB6 application (so a appname.exe.config file). For me, I used my DLL's config file (dllname.dll.config), renamed it and added it to the folder the EXE was in and everything started working.

Also, if you are debugging from the VB6 IDE, then you should create a vb6.exe.config file alongside the main vb6.exe and it works from the debugger then as well.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda