473,405 Members | 2,176 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,405 software developers and data experts.

httpwebrequest error

Can someone tell me why I keep getting the following error when trying issue
a web request thru VB.Net windows application. This was sample code for
using web request but I’m getting it on my code as well.
ERROR MSG: An unhandled exception of type
'System.Configuration.ConfigurationException' occurred in system.dll

VB Code:
Dim myHttpWebRequest As HttpWebRequest

myHttpWebRequest =
CType(WebRequest.Create("http://www.w3coder.com/contest/examples/WSObjMultiArr.asmx/TestObjSerilizer"), HttpWebRequest)

Dim myHttpWebResponse As HttpWebResponse =
CType(myHttpWebRequest.GetResponse(), HttpWebResponse)

Dim receiveStream As Stream = myHttpWebResponse.GetResponseStream()
Dim encode As Encoding = System.Text.Encoding.GetEncoding("utf-8")
Dim readStream As New StreamReader(receiveStream, encode)

Debug.WriteLine(readStream.ReadToEnd())
readStream.Close()
myHttpWebResponse.Close()

May 10 '06 #1
1 1342
Thus wrote Logger,
Can someone tell me why I keep getting the following error when trying
issue a web request thru VB.Net windows application. This was sample
code for using web request but I’m getting it on my code as well.
ERROR MSG: An unhandled exception of type
'System.Configuration.ConfigurationException' occurred in system.dll

VB Code:
Dim myHttpWebRequest As HttpWebRequest
myHttpWebRequest =
CType(WebRequest.Create("http://www.w3coder.com/contest/examples/WSObj
MultiArr.asmx/TestObjSerilizer"), HttpWebRequest)

Dim myHttpWebResponse As HttpWebResponse =
CType(myHttpWebRequest.GetResponse(), HttpWebResponse)

Dim receiveStream As Stream = myHttpWebResponse.GetResponseStream()
Dim encode As Encoding = System.Text.Encoding.GetEncoding("utf-8") Dim
readStream As New StreamReader(receiveStream, encode)

Debug.WriteLine(readStream.ReadToEnd())
readStream.Close()
myHttpWebResponse.Close()


Are you sure it's caused by this code? I'd rather suspect your app.config...

Cheers,
--
Joerg Jooss
ne********@joergjooss.de
May 13 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

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...
10
by: Gregory A Greenman | last post by:
I'm trying to write a program in vb.net to automate filling out a series of forms on a website. There are three forms I need to fill out in sequence. The first one is urlencoded. My program is...
6
by: Rachet? | last post by:
I am getting a "The remote server returned an error: (400) Bad Request." error while trying to send data to an asp page. The puzzle is, if I paste the string I want to send on a browser address...
0
by: Cozfer | last post by:
I am having a problem communicating with a remote server (on intranet) using the httpwebrequest object. We have used the object to communicate with other machines previously, but this time we must...
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...
2
by: GlennLanier | last post by:
Hello, I've searched the forums and can't find an answer -- if it i there, kindly point me in that direction. I would like to simulate a browser POSTing a FORM and be able to pars the response....
2
by: Maris Janis Vasilevskis | last post by:
Hi, Is it possible to force HttpWebRequest to do exactly (not approximately) the same as MSXML2.ServerXMLHTTP does? More details. I port JScript to JScript.NET I have a server (ASP invoking...
1
by: Kevin Landymore | last post by:
I have a vb.net service running under a Domain account. I'm trying to call a web service on our Mainframe (IBM CICS via SSL and Client Certificates) and after a while (1 or 2 days.. thousands of...
3
by: JansenH | last post by:
We have implemented a 'HTTP Post' client in C# that posts Xml documents to a webserver. This is working fine if the post rate is one post for every 20 seconds. But if the post rate is increased to...
2
by: =?Utf-8?B?TGFycnlLdXBlcm1hbg==?= | last post by:
Our WebDev team seems to have found a problem that exposes a bug in .NET 2.0. This problem can be shown when trying to access a WebService using SSL and through a proxy server after using the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...
0
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,...
0
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...

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.