D
Dave R
Hi all,
I am using the HttpWebRequest/HttpWebResponse API in my application to post data
to a remote server.
The remote server is a Unix box (remoteserver.remotedomain.com).
But somehow I receive no response from the server.
If I use a server in my own domain and specify
WebRequest.Create("http://myserver:1200"); things work fine.
Even fully qualified name of my own localserver fetches no response i.e.
WebRequest.Create("http://myserver.mydomain.com:1200"); things do not work.
Here is the relevant code.
HttpWebRequest request = (HttpWebRequest)
WebRequest.Create("http://remoteserver.remotedomain.com:1200");
request.Method = "POST" ;
request.ContentType = "application/vnd.wv.csp.wbxml";
request.ContentLength= Buffer.Length ;
WebProxy myProxy = WebProxy.GetDefaultProxy ();
request.Proxy = myProxy ;
Stream newStream = request.GetRequestStream(); newStream.Write (Buffer, 0,
Buffer.Length);
// Close the Stream object.
newStream.Close();
//****** CULPRIT LINE *********//
// The following call just blocks.
HttpWebResponse response = (HttpWebResponse)request.GetResponse ();
// *********************** //
// Get the stream associated with the response.
Stream receiveStream = response.GetResponseStream ();
/// ... so on
Am I missing on something ?
Best regards,
Dave
I am using the HttpWebRequest/HttpWebResponse API in my application to post data
to a remote server.
The remote server is a Unix box (remoteserver.remotedomain.com).
But somehow I receive no response from the server.
If I use a server in my own domain and specify
WebRequest.Create("http://myserver:1200"); things work fine.
Even fully qualified name of my own localserver fetches no response i.e.
WebRequest.Create("http://myserver.mydomain.com:1200"); things do not work.
Here is the relevant code.
HttpWebRequest request = (HttpWebRequest)
WebRequest.Create("http://remoteserver.remotedomain.com:1200");
request.Method = "POST" ;
request.ContentType = "application/vnd.wv.csp.wbxml";
request.ContentLength= Buffer.Length ;
WebProxy myProxy = WebProxy.GetDefaultProxy ();
request.Proxy = myProxy ;
Stream newStream = request.GetRequestStream(); newStream.Write (Buffer, 0,
Buffer.Length);
// Close the Stream object.
newStream.Close();
//****** CULPRIT LINE *********//
// The following call just blocks.
HttpWebResponse response = (HttpWebResponse)request.GetResponse ();
// *********************** //
// Get the stream associated with the response.
Stream receiveStream = response.GetResponseStream ();
/// ... so on
Am I missing on something ?
Best regards,
Dave