I set up a web service, and I've tried to call it from my httpmodule using a Proxy class and it will just timeout. I did more testing and tried a WebRequest and that times out also. If I specify the wrong url it will throw an exception with a 404 so it seems like this should be possible. Calling the web service from a web browser works fine so that isn't the problem. Any ideas?
HttpModules are no different than any other code. If you can do it from anywhere else, you can do it from a module. Since you didn't say anything about actually needing a proxy, I'm unclear why you're using a Proxy class in this case. Trying to use a Proxy when it's not necessary will likely lead to a timeout, since you're sending the request to a nonexistent network proxy.
Can you not just use a Web Reference or WebRequest to connect to the service?
are you sure there isnt a proxy server between you and the web service, .Net does a good job trying to sort this out but ive found many issues letting the framework try to sort out where the proxy is.
here is a hardcoded solution which although not best practice of any sort shows how to attach a proxy to a webclient request..
WebProxy proxy = new WebProxy("111.222.333.444:8080");
proxy.Credentials = CredentialCache.DefaultCredentials;
WebClient wc = new WebClient();
wc.Proxy = proxy;
// do your other stuff
ive noticed that .Net really struggles when the port isnt 80 and when the server platform doesnt have a proxy set in internet explorer, which i would prefer to be honest, i believe the default simply looks at what is set for the local internet connection but dont quote me on that