httpwebresponse - VB.Net HttpWebRequest.GetResponse always timeout -
i'm getting time out code.
the post https , works fine, never response,
i try httpwebrequest , webrequest, more timeout, no response
can me?
>system.net.servicepointmanager.certificatepolicy = new trustallcertificatepolicy() > >req = httpwebrequest.create(url) >req.method = "post" >req.timeout = 60000 > >dim bytearray = encoding.utf8.getbytes(url) > >req.contenttype = "text/xml" > >req.contentlength = bytearray.length > >dim datastream stream >datastream = req.getrequeststream() > >datastream.write(bytearray, 0, bytearray.length) > >datastream.close() >datastream.dispose() > >dim response httpwebresponse = nothing > ><b>response = req.getresponse() '---->>> timeout here </b> > >datastream = response.getresponsestream() > >dim reader streamreader >reader = new streamreader(datastream) > >dim responsefromserver string >responsefromserver = reader.readtoend() >reader.close() >datastream.close() >datastream.dispose() >response.close()
Comments
Post a Comment