Webservices through firewall

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Anyone knows how to add web reference in C#, when the internet need
authentication.

The credentials for proxy is asked and I pass the information. But after
all, I got this message:

"The underlying connection was closed: Unable to connect to the remote
server."


Tks!
 
Daniel,

There should be a property on your web service proxy which takes an
implementation of IWebProxy (which you can get from the static
GetDefaultProxy method through the WebProxy class). Set that, and it should
work.

Hope this helps.
 
Yes... But how I make that proxy, if I can't access the webservice?

Tks again.

Nicholas Paldino said:
Daniel,

There should be a property on your web service proxy which takes an
implementation of IWebProxy (which you can get from the static
GetDefaultProxy method through the WebProxy class). Set that, and it should
work.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Daniel Santana said:
Anyone knows how to add web reference in C#, when the internet need
authentication.

The credentials for proxy is asked and I pass the information. But after
all, I got this message:

"The underlying connection was closed: Unable to connect to the remote
server."


Tks!
 
Daniel,

There are two proxies here. There is the proxy between your machine and
the internet, and there is the proxy (in code) that you are using to make
calls on the remote web service. You need to set the proxy on your code
(which calls the web service) with the details of the proxy between your
machine and the internet so that it can reach the webservice.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Daniel Santana said:
Yes... But how I make that proxy, if I can't access the webservice?

Tks again.

Nicholas Paldino said:
Daniel,

There should be a property on your web service proxy which takes an
implementation of IWebProxy (which you can get from the static
GetDefaultProxy method through the WebProxy class). Set that, and it
should
work.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

message
Anyone knows how to add web reference in C#, when the internet need
authentication.

The credentials for proxy is asked and I pass the information. But
after
all, I got this message:

"The underlying connection was closed: Unable to connect to the remote
server."


Tks!
 
OK...

Still talking about WS proxy (code). I know 2 ways to get that proxy:

1) Using the wsdl tool (in .Net command prompt);
2) Adding a web reference in my project.

And there's where lives my doubt. I don't know how do get that proxy
(neither wsdl, neither add web reference) just because the proxy (internet
proxy) blocks the connection. Even typing proxy info (just like IE) I steel
receive the "underlying" message....

Any idea of how to pass the proxy info in command prompt (in order to use
the wsdl.exe) or how to set the proxy info in add reference wizard?

Tks

Nicholas Paldino said:
Daniel,

There are two proxies here. There is the proxy between your machine and
the internet, and there is the proxy (in code) that you are using to make
calls on the remote web service. You need to set the proxy on your code
(which calls the web service) with the details of the proxy between your
machine and the internet so that it can reach the webservice.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Daniel Santana said:
Yes... But how I make that proxy, if I can't access the webservice?

Tks again.

Nicholas Paldino said:
Daniel,

There should be a property on your web service proxy which takes an
implementation of IWebProxy (which you can get from the static
GetDefaultProxy method through the WebProxy class). Set that, and it
should
work.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

message
Anyone knows how to add web reference in C#, when the internet need
authentication.

The credentials for proxy is asked and I pass the information. But
after
all, I got this message:

"The underlying connection was closed: Unable to connect to the remote
server."


Tks!
 
Daniel,

There are a number of slash commands to use for setting the proxy using
WSDL (/proxy, /proxydomain).

However, the easiest solution would be to get the WSDL file through IE
or a browser, and then just save it locally, and run WSDL.exe against that.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Daniel Santana said:
OK...

Still talking about WS proxy (code). I know 2 ways to get that proxy:

1) Using the wsdl tool (in .Net command prompt);
2) Adding a web reference in my project.

And there's where lives my doubt. I don't know how do get that proxy
(neither wsdl, neither add web reference) just because the proxy (internet
proxy) blocks the connection. Even typing proxy info (just like IE) I
steel
receive the "underlying" message....

Any idea of how to pass the proxy info in command prompt (in order to use
the wsdl.exe) or how to set the proxy info in add reference wizard?

Tks

Nicholas Paldino said:
Daniel,

There are two proxies here. There is the proxy between your machine
and
the internet, and there is the proxy (in code) that you are using to make
calls on the remote web service. You need to set the proxy on your code
(which calls the web service) with the details of the proxy between your
machine and the internet so that it can reach the webservice.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

message
Yes... But how I make that proxy, if I can't access the webservice?

Tks again.

:

Daniel,

There should be a property on your web service proxy which takes
an
implementation of IWebProxy (which you can get from the static
GetDefaultProxy method through the WebProxy class). Set that, and it
should
work.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

message
Anyone knows how to add web reference in C#, when the internet need
authentication.

The credentials for proxy is asked and I pass the information. But
after
all, I got this message:

"The underlying connection was closed: Unable to connect to the
remote
server."


Tks!
 
Thank you so pretty much!!

Nicholas Paldino said:
Daniel,

There are a number of slash commands to use for setting the proxy using
WSDL (/proxy, /proxydomain).

However, the easiest solution would be to get the WSDL file through IE
or a browser, and then just save it locally, and run WSDL.exe against that.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Daniel Santana said:
OK...

Still talking about WS proxy (code). I know 2 ways to get that proxy:

1) Using the wsdl tool (in .Net command prompt);
2) Adding a web reference in my project.

And there's where lives my doubt. I don't know how do get that proxy
(neither wsdl, neither add web reference) just because the proxy (internet
proxy) blocks the connection. Even typing proxy info (just like IE) I
steel
receive the "underlying" message....

Any idea of how to pass the proxy info in command prompt (in order to use
the wsdl.exe) or how to set the proxy info in add reference wizard?

Tks

Nicholas Paldino said:
Daniel,

There are two proxies here. There is the proxy between your machine
and
the internet, and there is the proxy (in code) that you are using to make
calls on the remote web service. You need to set the proxy on your code
(which calls the web service) with the details of the proxy between your
machine and the internet so that it can reach the webservice.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

message
Yes... But how I make that proxy, if I can't access the webservice?

Tks again.

:

Daniel,

There should be a property on your web service proxy which takes
an
implementation of IWebProxy (which you can get from the static
GetDefaultProxy method through the WebProxy class). Set that, and it
should
work.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

message
Anyone knows how to add web reference in C#, when the internet need
authentication.

The credentials for proxy is asked and I pass the information. But
after
all, I got this message:

"The underlying connection was closed: Unable to connect to the
remote
server."


Tks!
 
Back
Top