473,624 Members | 2,150 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HttpWebRequest GetRequestStrea m - unable to connect

1 New Member
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 3210
sshahir
1 New Member
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. GetRequestStrea m(). I appreciate for any suggestions.

Cheers,
sshahir
Feb 3 '08 #2
JamieHowarth0
533 Recognized Expert Contributor
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
8168
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 Cronin Data On Call - Programmer
4
2161
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 = "text/xml"; StreamWriter sw = new StreamWriter(request.GetRequestStream()); //error occurs here
3
9883
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 connect to the remote server. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more
0
1445
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 when the PDT has no network connections ( i.e. configured for dhcp on the wireless interface, and the wireless settings aren't configured ), and the HttpWebRequest is blocking on GetRequestStream, abort doesn't throw an exception and the...
6
1753
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 webpage, then it always gives me this exception The underlying connection was closed: Unable to connect to the remote server. I am using the System.Net namespace Code is below:
0
1473
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 - HTTPS I will only be doing HTTP POST requests. The web address are as follows. orbitalvar1.paymentech.net/authorize on port 443 Now the XML gateway URL must be accessed using the https protocol. But
0
2566
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 WebMethods as the platform that receives these postings. I don't have any experience with that technology. The sample below is the from test app that I put together to post the XML (cXML Order Requests) documents. These documents, at least my
2
16354
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 requires a client certificate which they have provided in .cer format. I can connect ok to their test service which uses SSL but doesnt require a client certificate with the code below. I dont have great deal of knowledge about client certificates...
0
2410
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 server certificate. However, I keep getting an error "Unable to connect to remote server". I know I am able to connect to their server and retrieve an XML response as we were able to do this using our old solution (WinHTTP in Visual Basic 6). ...
1
8335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8475
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7159
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6110
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5563
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4079
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2606
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.