Dear, I have found it very difficult to find the solution to this problem:
It turns out that I am using third-party dll which can not be integrated into the project in visual studio. Using the dllImport function I have managed to use them without problems in a desktop test application that makes, now I intend to transfer it to the web, but this does not work, I do not even give me an error with which to work simply remains in an infinite load. I have read that it could be because of the location of the dll in question, in the project of the desktop I put them in the folder bin of the project, the same as in the web, but in one it works and in the other no.
The code I use for this is:
[DllImportAttribute("ejemplo.dll", EntryPoint = "OpenIPPort", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
public static extern int OpenIPPort(System.IntPtr ip_address, int tcp_port);