473,386 Members | 1,745 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,386 software developers and data experts.

HttpWebRequest GetRequestStream - unable to connect

Hello,

i really need your help on this one.

im trying to pass an XML by a web service using HttpWebRequest and a POST Method.

here is my code :
Expand|Select|Wrap|Line Numbers
  1.             HttpWebRequestObj = CType(WebRequest.Create(RequestURL), HttpWebRequest)
  2.             HttpWebRequestObj.ContentLength = XmlRequest.Length
  3.             HttpWebRequestObj.Method = "POST"
  4.             HttpWebRequestObj.ContentType = "text/xml; charset=windows-1255"
  5.             HttpWebRequestObj.KeepAlive = True
  6.  
  7.  
  8.             StreamObj = HttpWebRequestObj.GetRequestStream()
  9.             StreamWriterObj = New StreamWriter(HttpWebRequestObj.GetRequestStream())
  10.             StreamWriterObj.Write(XmlRequest)
  11.             StreamWriterObj.Close() 

the error i get is : Unable to connect to the remote server
the url im trying to connet to : http://www.iza.org.il/privateWallaGetHotelAvail.php

__________________________________________________ __

"...if you cant compile your life, mybe all you need is simply to add ; ..."
check out my own made site :)
Jan 28 '08 #1
2 3190
Hello All,

I am also running into the similar issue. what I am trying to do is to pass data to apache server (a php file) using HttpWebRequest.GetRequestStream(). I appreciate for any suggestions.

Cheers,
sshahir
Feb 3 '08 #2
JamieHowarth0
533 Expert 512MB
Hi folks,

The ASP forum is for classic ASP questions/problems,
not ASP.NET questions. Please post in the .NET Forum in future.

Many thanks,

medicineworker
Moderator, TheScripts Developer Network
Feb 6 '08 #3

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

Similar topics

9
by: Mike Cronin via DotNetMonster.com | last post by:
Hi there, Can anyone tell me what level of encryption is used when making an HTTPS POST request through an instance of the System.Net.HttpWebRequest object? Thanks much in advance! Mike...
4
by: David Cho | last post by:
Hi, this is just plain strange. This is my code. HttpWebRequest request = (HttpWebRequest) WebRequest.Create("http://www.yahoo.com"); request.Method = "POST"; request.ContentType =...
3
by: Jason | last post by:
I'm having a hard time getting a call to HttpWebRequest's GetRequestSteam to work. Each time I try to run it, I get the following error: The underlying connection was closed: Unable to...
0
by: a_newcomb | last post by:
I have an application which polls and connects to a webserver on a background thread. When the application is supposed to exit, I call abort on the HttpWebRequest object. I have observed that...
6
by: Darren | last post by:
I created a class to submit an xml document to a webpage. When I use my class in a console application, everything submits correctly. However, when I attempt to use my class from an asp.net...
0
by: Brett Wesoloski | last post by:
A little about what I am trying to accomplish I am tyring to do a HttpWebRequest to a company called Paymentech. Here are some of there requirements: It supports one method of communication -...
0
by: joshblair | last post by:
Hello, I am trying to post XML documents to a third party using the HttpWebRequest. This URL uses HTTPS (SSL) but I don't have a client certificate to deal with. Apparently they are using...
2
by: steveS | last post by:
Hi all, I'm having trouble connecting to a Java web service using HttpWebRequest. I get the error message "The request was aborted: Could not create SSL/TLS secure channel". The Java service...
0
by: nomad | last post by:
Hi, I am using HTTPWebRequest to add a client certificate. I am then using HTTPWebRequest to POST xml to a web service which requires the attached client certificate to authenticate with their...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.