0

When accessing a database in Microsoft Azure via a VB.Net DLL, the following error occurs:

System.Net.WebException: Unable to connect to remote server ---> System.Net.Sockets.SocketException: An attempt was made to access a socket in a manner that is prohibited by access permissions 191.235.228.33:443

at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) --- End of inner exception stack trace ---

at System.Net.HttpWebRequest.GetResponse()

at MICROCADAPI.MICROCADAPI.NewCmdTESTEHTTP()

at Autodesk.AutoCAD.Runtime.CommandClass.InvokeWorker(MethodInfo mi, Object commandObject, Boolean bLispFunction)

at Autodesk.AutoCAD.Runtime.CommandClass.InvokeWorkerWithExceptionFilter(MethodInfo mi, Object commandObject, Boolean bLispFunction)

at Autodesk.AutoCAD.Runtime.PerDocumentCommandClass.Invoke(MethodInfo mi, Boolean bLispFunction) `

Dim JSURL As String = https://microcad.azurewebsites.net/teste/T269999
ServicePointManager.SecurityProtocol = CType(3072, SecurityProtocolType) '3072=TLS 1.2 / 768=TLS 1.1
Dim request As HttpWebRequest = CType(WebRequest.Create(JSURL), HttpWebRequest)
request.Proxy = Nothing
request.Timeout = 15 * 1000
Dim response As HttpWebResponse = CType(request.GetResponse, HttpWebResponse) '<<< ERRO OCORRE AQUI <<<
Dim dataStream As Stream = response.GetResponseStream()
Dim reader As New StreamReader(dataStream)
Dim JSON As String = reader.ReadToEnd()
reader.Close()
response.Close()

Grateful, Felix Melo Technical / Administrative Director

0 Answers0