Timeout accessing .Net Webservice via POST or GET

A

Achim Domma

Hi,

I try to access an .Net webservice which is accessible via HTTP POST
and GET. Using a browser this works just fine, but using Net::HTTP
causes a timeout in rbuf_fill. Any hint how to debug this? Or is it a
know problem with MS ISS? I didn't find anything using
groups.google.com. Here is my code:

Net::HTTP.get_print URI.parse('https://secure...url which works fine
in browser...')

regards,
Achim
 
B

Brian Candler

Hi,

I try to access an .Net webservice which is accessible via HTTP POST
and GET. Using a browser this works just fine, but using Net::HTTP
causes a timeout in rbuf_fill. Any hint how to debug this? Or is it a
know problem with MS ISS? I didn't find anything using
groups.google.com. Here is my code:

Net::HTTP.get_print URI.parse('https://secure...url which works fine
in browser...')

Are you enabling ssl? Try the following sample code from the documentation
embedded in net/https.rb

require 'net/https'
require 'uri'

uri = URI.parse(ARGV[0] || 'https://localhost/')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true if uri.scheme == "https" # enable SSL/TLS
http.start {
http.request_get(uri.path) {|res|
print res.body
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top