recently have started receiving alerts following stack trace:
message: thread being aborted.
stack trace: @ system.net.connection.completestartconnection(boolean async, httpwebrequest httpwebrequest) @ system.net.connection.completestartrequest(boolean onsubmitthread, httpwebrequest request, tristate needreconnect) @ system.net.connection.submitrequest(httpwebrequest request, boolean forcedsubmit) @ system.net.servicepoint.submitrequest(httpwebrequest request, string connname) @ system.net.httpwebrequest.submitrequest(servicepoint servicepoint) @ system.net.httpwebrequest.getresponse() @ removed protect identity
it seems me thread aborted before actual connection made remote server. true? why such situation occur - trying narrow down problem.
i tried looking documentation on system.net.connection.completestartconnection
method , couldn't find anything. ideas?
update: adding structure of calling code in response comments.
httpwebrequest request = (httpwebrequest)httpwebrequest.create(uri); request.method = method; request.contenttype = "application/xml"; request.headers.add("foo", "bar"); request.proxy = new system.net.webproxy(proxyaddress); httpwebresponse response = (httpwebresponse)request.getresponse();
update 2: alert occurs sporadically few minutes , goes away.
update 3: essential piece of information hadn't provided yet - piece of code displayed in update 1 being called task on timer.
i've dealt problem before , indication either code around calling service through client or service calling thread.abort()
(which bad practice, used mitigate fact connections can remain stuck open on server). threadabortexceptions
in service calls occur when thread explicitly being told abort.
i should add if server aborting thread, you'll soapexception
. check codebase usages of thread.abort()
.