Access web service through proxy server

  • Thread starter Get modulus exponent from X509 cetificat
  • Start date
G

Get modulus exponent from X509 cetificat

Hello,

I am trying to access one web service (on machine A) from machine B using
web application. I can browse the web service from web browser. But when I
access the web service from application, sometimes(80%) it crashed with the
error saying: "Redirect (authentication_redirect_to_virtual_host), You are
being redirected to the authentication virtual host, For assistance, contact
your network support team." But sometimes (20%) it is successful. I am
SUSPECTING that I need pass through proxy server, because there is one proxy
server between machine A and B. So my questions are:

1. Is this because of proxy server?
2. If yes, Do I have to use WSE to pass through proxy server? I am trying to
use HttpWebRequest and WebProxy, it does not work.

Thank you very much in advance.

Grace
 
J

John Saunders

"Get modulus exponent from X509 cetificat"
Hello,

I am trying to access one web service (on machine A) from machine B using
web application. I can browse the web service from web browser. But when I
access the web service from application, sometimes(80%) it crashed with
the
error saying: "Redirect (authentication_redirect_to_virtual_host), You are
being redirected to the authentication virtual host, For assistance,
contact
your network support team."

What did your network support team say when you asked them?

John
 
G

Get modulus exponent from X509 cetificat

Thanks for your response, John.
My network team say that might be proxy problem. Right now, I am using this
code:

// get web service instance
private crossroads.CaasServices CaasServices = new
Crossroads1.crossroads.CaasServices();

int port = 8080;
WebProxy proxy=new WebProxy("proxy", port);
//proxy.Credentials = new NetworkCredential("username", "password");
proxy.Credentials = CredentialCache.DefaultCredentials;
CaasServices.Proxy = proxy;

//call web service method
bool isValid = CaasServices.IsAuthorized(appID, user, role, auth);

When I use CredentialCache.DefaultCredentials, it gave me error: The request
failed with HTTP status 407: Proxy Authentication Required ( The ISA Server
requires authorization to fulfill the request. Access to the Web Proxy
service is denied. ).

When I use new NetworkCredential("username", "password"); it gave me time
out error.


Any further suggestion please?

Thanks,

Grace
 
J

John Saunders

"Get modulus exponent from X509 cetificat"
Thanks for your response, John.
My network team say that might be proxy problem. Right now, I am using
this
code:

// get web service instance
private crossroads.CaasServices CaasServices = new
Crossroads1.crossroads.CaasServices();

int port = 8080;
WebProxy proxy=new WebProxy("proxy", port);
//proxy.Credentials = new NetworkCredential("username", "password");
proxy.Credentials = CredentialCache.DefaultCredentials;
CaasServices.Proxy = proxy;

//call web service method
bool isValid = CaasServices.IsAuthorized(appID, user, role, auth);

When I use CredentialCache.DefaultCredentials, it gave me error: The
request
failed with HTTP status 407: Proxy Authentication Required ( The ISA
Server
requires authorization to fulfill the request. Access to the Web Proxy
service is denied. ).

When I use new NetworkCredential("username", "password"); it gave me time
out error.

Are you saying that when you pass the correct username and password you get
a timeout?

Can you determine whether the web service is receiving your call? If so,
then perhaps it is receiving the call, but the proxy service is eating the
response, causing your timeout.

John
 

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,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top