473,383 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

HttpWebRequest - no response

3
I'm sending an HttpWebRequest to a BizTalk server. BizTalk receives and asyncronously processes correctly, but I never receive an http response. The last statement in the snippet below is where my code hangs. This same code works in my DEV environment - I get the repsonse almost instantly. IIS appears to be setup the same on each box. The error message follows:

The underlying connection was closed: The request was canceled.

Any ideas??

Expand|Select|Wrap|Line Numbers
  1. HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(url);
  2. req.Method = "POST";
  3. ASCIIEncoding encoding = new ASCIIEncoding();
  4. byte[] requestData = encoding.GetBytes(xmlMessage);
  5. req.ContentType = "application/x-www-form-urlencoded";
  6. req.ContentLength = xmlMessage.Length;
  7. Stream requestStream = req.GetRequestStream();
  8. requestStream.Write(requestData, 0, requestData.Length);
  9. HttpWebResponse response = (HttpWebResponse)req.GetResponse(); 
  10.  
Aug 31 '07 #1
1 3240
kenobewan
4,871 Expert 4TB
Are the platforms for both servers the same?
Sep 1 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: TJO | last post by:
Can someone at MS please reply to this. I am trying to post data so a web form via ssl with the following code. I keep getting this error: "The underlying connection was closed: Could not...
2
by: Kueishiong Tu | last post by:
I have a url, I pass it to Webclient, and I get response without any problem. String* uriString = S"trade7.masterlink.com.tw/futures/QuotePrice.jsp"; String* postData = S""; // Create a new...
16
by: thomas peter | last post by:
I am building a precache engine... one that request over 100 pages on an remote server to cache them remotely... can i use the HttpWebRequest and WebResponse classes for this? or must i use the...
0
by: Sivashankaran Vaidhyalingam | last post by:
Hi folks, I have an aspx application App A hosted in a server which is inside the intranet . I need to serve pages from this application _through_ another application App B which acts as a proxy...
1
by: iana_kosio | last post by:
Hi, I am using HttpWebRequest class to communicate with remote server. In some cases the server would return 5xx status code which results in HttpWebRequest object throwing an exception. I,...
1
by: sfoxover | last post by:
Hi, Could someone please give me some suggestions on how to make this class robust. I need to be able to handle around 20 similtanious requests to this class which causes a web browser to...
6
by: Oliver | last post by:
I have a very wired problem requesting one specific url from within my application. I have struggeled with this for 5 hours now, and searched google withour any luck, so i hope that someone are...
0
by: Fred Herring | last post by:
I currently use httpwebrequest to download large byte array files from my server. I am curious about how to change my httpwebrequest code to allow posing a large byte array to a virtual foldeer. ...
0
by: boxboy | last post by:
Hi, I'm writing a console application and am having a problem with HttpWebRequest when posting data to a webserver. A "System.Net.WebException: The server committed a protocol violation" is always...
0
by: dattaforit | last post by:
I am using VC++ .Net (2003). In my application i create a HttpWebRequest object, add the method and header to the request. An now try to get the response. I get the response. to get the response i...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.