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

HttpWebRequest through proxy, gateway timeout

Hello everybody

I am making a function sending SMS, to send SMS we subscribe for a service
from the norwegian telephone company Netcom
To send these messages we send a HttpWebRequest over internet.

The function work well when I am sending from my home without proxy, but
when I take the computer inside the company I get problem with the proxy,
the error message is
"The remote server returned an error: (504) Gateway Timeout."

Have anybody else out there solved a problem like this before, I would be
very happy if you could share your experience with me.

Erik Fjelldal

My code:
Dim SMSURL As String = http://firebolt.netcom.no:8080/sms/send
Dim Request As HttpWebRequest
Dim Response As HttpWebResponse
Dim RequestString As String

RequestString = SMSURL & "?"
RequestString &= "number=" & "12345678"
RequestString &= "&"
RequestString &= "message=Hello, this is a test."
Request = WebRequest.Create(RequestString)
Request.KeepAlive = True
Request.MaximumResponseHeadersLength = 99999

Dim MyProxy As New WebProxy
MyProxy = GlobalProxySelection.Select
MyProxy.UseDefaultCredentials = True
Request.Proxy = MyProxy

Dim myCache As New CredentialCache
myCache.Add(New Uri(SMSURL), "Basic", New NetworkCredential("myUserName",
"myPassWord"))
Request.Credentials = myCache

Response = Request.GetResponse
Dim ResponseStream As IO.Stream
ResponseStream = Response.GetResponseStream
Dim ReadStream As New IO.StreamReader(ResponseStream, False)
Dim ResponseString = ReadStream.ReadToEnd


May 22 '06 #1
0 2370

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

Similar topics

8
by: Du | last post by:
I'm trying to automate the upload process to yousendit.com, but the file size doesn't add up and yousendit.com keep rejecting my upload (it accepts the upload until the very end) I don't know...
9
by: Michael Evanchik | last post by:
Hello all, since i wanted to use ssl and its seems easy to do so with this object. Im trying to login to a webserver (aol) for this example. But for some reason, im packet sniffing with ethreal...
1
by: Joey Chömpff | last post by:
Hello, When I'm uploading an file to a JRun WebServer (third party) with a Windows Forms application, l always get an TimeOut while uploading, all other request who doesn't request an post are...
1
by: Jeff B | last post by:
I'm trying to create a simple screen scraping application and I kept getting a System.Net.WebException thrown back with a message of "The operation has timed-out." At first I thought it was some...
6
by: RP | last post by:
Hi all, I have some code that does a basic form post to an .aspx page submitting some XML in the body. This code used to work on my WIN2K server running .net 1.0 sp2. Now since I have upgraded to...
5
by: japslam japslam via DotNetMonster.com | last post by:
Hi all, I have problem when I use HttpWebRequest and take long time to call to my service server. If at that time there are many request comes in semultaneous, I will get this exception ...
12
by: Jens Jensen | last post by:
I try to set the timeout property on my HttpWebRequest object before lunching the request. It seems like any value above 100 seconds is discarded. Has anyone observered malfunctional with this...
0
by: rony_16 | last post by:
Hi, I would like to ask a question . i need to write a code that connects to a site (for example www.example.com) but with a different host (for exapmple www.something.com) . i read in msdn that...
1
by: moo | last post by:
Is there a simple way to get my logon credentials to make my web request work through our proxy server? I tried CredentialCache.DefaultCredentials, but I get nothing back. I can get it to work if 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: 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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.