Web Service – Error 500 Internal Server Error When Using WebMethod on Server

I have a page in ASP.NET in which I have added a WebMethod (part of the code below) while running on my mic. This page works normally, but when I load it on the server and run it, I get a "500 Internal Server Error" error.
I've done the debugging of the run and it points the error exactly in the line where I'm referring to this WebMethod (see the debug image below).

Public shared function GetCurrentDate (ByVal Base64 as a string, ByVal MailTo as a string) as a string
Dim strSQL As String
Dim conn As New MySqlConnection
Dim myCommand As New MySqlCommand
Dim myAdapter As New MySqlDataAdapter
Dim ds As New DataSet
Dim dtCompany As New DataTable

Debugging photo

I wonder if there may be components missing in the server, but I'm not sure what that can be.

Someone has suggestions .. ??
Thank you