Hello.
I have a webservice located on a machine within our network. I have
developed and tested this webservice internally without having to worry
about credentials. Now I wish for web applications located on a server
outside the network to be able to consume this webservice. I do not
want to put the webservice outside the network, and only want to allow
a handful of web applications to be able to consume it.
The error I'm getting is as follows:
--------------------------------------------------------------------------------
The underlying connection was closed: Unable to connect to the remote
server.
Upon some researching I found articles about HTTP Proxy server/firewall
settings messing with the connections, resulting in the previous error.
So I made changes to the web.config and the way that I call the
webservice.
Web.config:
<system.net>
<defaultProxy>
<proxy
usesystemdefault = "false"
proxyaddress="http://proxyserver:port"
bypassonlocal="true"
/>
</defaultProxy>
</system.net>
I call the webservice as follows:
Dim ws As New myServices.webservice
Dim myProxy As New WebProxy("http://proxyip:proxyport", True)
ws.Proxy = myProxy
ws.Credentials = New System.Net.NetworkCredential("name",
"password")
Dim asdf As String = ws.Process()
I still receive the same error and am running out of ideas. Please
help.
Thanks.