Vb.NET Writing HTTPWebRequest String Timeout

'req is type HTTPWebRequest
The code below fails to work.  ATM I do not know why, but it simply times out. I am thinking that the object is not being properly disposed of.
req.GetRequestStream().Write(reqBody, 0, reqBody.Length)
 Use the following below instead.
        Using inputStream = req.GetRequestStream()
            inputStream.Write(reqBody, 0, reqBody.Length)
        End Using

Comments

Popular posts from this blog

Asp.net Publishing Broke Site - "App_WebReferences is not allowed because the application is precompiled"

Telerik - Custom Group Footers In RadGrid