Wrox Programmer Forums
|
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 15th, 2004, 03:31 AM
Registered User
 
Join Date: Apr 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default HTTPWebRequest hangs in ASP.NET

I have code that sends a POST to a URL using HTTPWebRequest. When I use the following code inside ASP.NET, the line stream.Write() hangs.

request = ".....";
Stream stream = httpRequest.GetRequestStream();
stream.Write( scmpRequest, 0, scmpRequest.Length );
byte[] byte1 = encoding.GetBytes(request);

httprequest.ContentLength = request.Length;
httprequest.Method = "POST";
httprequest.TransferEncoding = "UTF8";
httprequest.ContentType = "text/xml; encoding='utf-8'";
requestStream = httprequest.GetRequestStream();
requestStream.Write(byte1, 0, byte1.Length);
requestStream.Flush();
requestStream.Close();

What could I be missing or not doing right? Any configuration settings I need to be aware of to allow POSTs to other servers from within an .aspx file?

Note: It is actually able to send the data to the server. I know because we also own the server that I'm posting to and I can see my requests coming in. So, I think the problem is that Write() just won't return for some reason.

Thanks. I'm really desperate, pleas help me :(.


 
Old August 4th, 2004, 02:48 PM
Registered User
 
Join Date: Aug 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Have you ever solved the problem?
I'm having the same problem...






Similar Threads
Thread Thread Starter Forum Replies Last Post
ProgressBar on httpwebrequest panuvin C# 1 February 5th, 2007 03:24 PM
HttpWebRequest over SSL Suhrit ASP.NET 2.0 Professional 0 December 7th, 2006 03:41 AM
ASP Page hangs when calls a vb component king05 Classic ASP Components 0 March 28th, 2005 01:07 PM
About HttpWebRequest in vb.net zhangxueq VS.NET 2002/2003 1 February 9th, 2004 12:30 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.