Possible to configure webservice to tell client to bypass proxy

Discussion in 'ASP .Net Web Services' started by Lars-Erik, Jun 20, 2008.

  1. Lars-Erik

    Lars-Erik Guest

    Hi!

    I don't have too much experience with proxies, but have stumbled into a
    little nut. We've got a flash on a website that calls a couple of webservices
    on another server.
    Flash has a very thin proxy object, and you can't configure much on it.
    Our customer, and a few of theirs surf via a proxy and get a connection
    exception when flash tries to call the services.
    I made a test app, and when our customer runs it they get the following
    exception:
    The request failed with HTTP status 407: Proxy Authentication Required.
    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse

    I've asked them to get the IT guys to configure their proxy to let the users
    bypass it for the relevant urls (both webservice and flash), but they still
    get the exceptions.

    Is it possible to configure the services (server-side) to tell the clients
    not to use the proxy or something like that?

    --
    Lars-Erik
     
    Lars-Erik, Jun 20, 2008
    #1
    1. Advertising

  2. Hi LE,

    From your description, you have an flash component which will call some
    remote webservices. However, the flash component is reporting "proxy
    authentication error" when running on web page, correct?

    As far as I know, proxy setting is a pure client-side configuration(for
    client web component such as WebRequest or webservice client proxy). For
    your scenario, the server-side service is not able to control the client
    consumer's proxy setting. BTW, as you said the webservice client is a
    Flash one, however, the exception message indicate that the proxy code is
    .NET based, is there anything I've missed?

    For .NET framework's proxy detection and configuration, here is a good
    article introduce the details:

    #Take the Burden Off Users with Automatic Configuration in .NET
    http://msdn.microsoft.com/en-us/magazine/cc300743.aspx

    If the consumer does use .NET code, I suggest you first create a rich
    client .NET application which calls the webservice to see whether it works.
    Also, I still suspect that the server-side intermediate proxy setting may
    not be configured correctly(turn off authentication).

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    Delighting our customers is our #1 priority. We welcome your comments and
    suggestions about how we can improve the support we provide to you. Please
    feel free to let my manager know what you think of the level of service
    provided. You can send feedback directly to my manager at:
    .

    ==================================================
    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    ications.

    ==================================================
    This posting is provided "AS IS" with no warranties, and confers no rights.

    --------------------

    >From: =?Utf-8?B?TGFycy1Fcmlr?= <>
    >Subject: Possible to configure webservice to tell client to bypass proxy
    >Date: Fri, 20 Jun 2008 04:23:01 -0700


    >
    >Hi!
    >
    >I don't have too much experience with proxies, but have stumbled into a
    >little nut. We've got a flash on a website that calls a couple of

    webservices
    >on another server.
    >Flash has a very thin proxy object, and you can't configure much on it.
    >Our customer, and a few of theirs surf via a proxy and get a connection
    >exception when flash tries to call the services.
    >I made a test app, and when our customer runs it they get the following
    >exception:
    >The request failed with HTTP status 407: Proxy Authentication Required.
    > at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse
    >
    >I've asked them to get the IT guys to configure their proxy to let the

    users
    >bypass it for the relevant urls (both webservice and flash), but they

    still
    >get the exceptions.
    >
    >Is it possible to configure the services (server-side) to tell the clients
    >not to use the proxy or something like that?
    >
    >--
    >Lars-Erik
    >
     
    Steven Cheng [MSFT], Jun 23, 2008
    #2
    1. Advertising

  3. Lars-Erik

    Lars-Erik Guest

    RE: Possible to configure webservice to tell client to bypass prox

    > However, the flash component is reporting "proxy
    > authentication error" when running on web page, correct?


    yep

    > BTW, as you said the webservice client is a
    > Flash one, however, the exception message indicate that the proxy code is
    > .NET based, is there anything I've missed?
    > If the consumer does use .NET code, I suggest you first create a rich
    > client .NET application which calls the webservice to see whether it works.


    The flash version I use don't report any "good" exceptions ("connection
    failed"), so I made a test-app (rich client) to find out why the customer
    didn't get a response from the webservice. Hence the .net exception message.
    ;)

    > Also, I still suspect that the server-side intermediate proxy setting may
    > not be configured correctly(turn off authentication).


    The service is configured for anonymous use and generally works very well.
    Unless there's something else to configure than windows/forms authentication?
    (I'm grasping for straws here... )

    Lars-Erik
     
    Lars-Erik, Jun 23, 2008
    #3
  4. RE: Possible to configure webservice to tell client to bypass prox

    Thanks for your reply LE,

    Now I got why the code snippet is .NET based :)

    For the following things you mentioned:

    ================
    The service is configured for anonymous use and generally works very well.
    Unless there's something else to configure than windows/forms
    authentication?
    (I'm grasping for straws here... )
    ================

    Well, the service is allow anonymous means the webserver (such as IIS) has
    turn off the authentication. However, the error you encounter indicate that
    there is "proxy authentication" which is different from the webservice
    application's authentication. I think you need to contact the server-side
    to check whether there is any intermediate proxy server or firewall that
    add authentication here.

    Also, for .NET based webservice client, you'll find that these two
    authentication are also handled difererently. e.g.

    ================

    FindServiceSoap myFindService = new FindServiceSoap();

    //this set the credentials for the service's authentication
    myFindService.Credentials = xxxx;

    WebProxy myProxy = new WebProxy("http://proxyserver:port",true);

    //this set the credentials for the proxy authentication
    myProxy.Credentials = xxxx;


    myFindService.Proxy = myProxy;


    ================


    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    Delighting our customers is our #1 priority. We welcome your comments and
    suggestions about how we can improve the support we provide to you. Please
    feel free to let my manager know what you think of the level of service
    provided. You can send feedback directly to my manager at:
    .

    ==================================================
    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    ications.

    ==================================================
    This posting is provided "AS IS" with no warranties, and confers no rights.


    --------------------
    >From: =?Utf-8?B?TGFycy1Fcmlr?= <>
    >References: <>

    <>
    >Subject: RE: Possible to configure webservice to tell client to bypass prox
    >Date: Sun, 22 Jun 2008 23:48:00 -0700


    >
    >> However, the flash component is reporting "proxy
    >> authentication error" when running on web page, correct?

    >
    >yep
    >
    >> BTW, as you said the webservice client is a
    >> Flash one, however, the exception message indicate that the proxy code

    is
    >> .NET based, is there anything I've missed?
    >> If the consumer does use .NET code, I suggest you first create a rich
    >> client .NET application which calls the webservice to see whether it

    works.
    >
    >The flash version I use don't report any "good" exceptions ("connection
    >failed"), so I made a test-app (rich client) to find out why the customer
    >didn't get a response from the webservice. Hence the .net exception

    message.
    >;)
    >
    >> Also, I still suspect that the server-side intermediate proxy setting

    may
    >> not be configured correctly(turn off authentication).

    >
    >The service is configured for anonymous use and generally works very well.
    >Unless there's something else to configure than windows/forms

    authentication?
    >(I'm grasping for straws here... )
    >
    >Lars-Erik
    >
     
    Steven Cheng [MSFT], Jun 23, 2008
    #4
  5. Lars-Erik

    Lars-Erik Guest

    RE: Possible to configure webservice to tell client to bypass prox

    > I think you need to contact the server-side
    > to check whether there is any intermediate proxy server or firewall that
    > add authentication here.


    There is at the customer's offices. They'be been fiddling with bypassing the
    proxy for our servers, but don't get it to work. Don't know if they do
    something wrong.

    > FindServiceSoap myFindService = new FindServiceSoap();
    >
    > //this set the credentials for the service's authentication
    > myFindService.Credentials = xxxx;
    >
    > WebProxy myProxy = new WebProxy("http://proxyserver:port",true);
    >
    > //this set the credentials for the proxy authentication
    > myProxy.Credentials = xxxx;
    >
    > myFindService.Proxy = myProxy;
    >


    That's really useful for our .net clients. :) Thanks.
    Alas Flash don't have anything to support this.

    We're probably going to create a HTML equivalent of the web this autumn
    anyway, so I hope they manage to configure their proxy instead of us fiddling
    with the flash.

    L-E
     
    Lars-Erik, Jun 24, 2008
    #5
  6. RE: Possible to configure webservice to tell client to bypass prox

    Thanks for your reply LE,

    Yes, if possible, it would be much better to let the server-side check the
    network environment and adjust the proxy or authentication settings. For
    client-side, if Flash doesn't support assigning a proxy or proxy
    authentication info programmtically, it would be quite restricted. Anyway,
    if there is anything else need help, please feel free to post here.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    Delighting our customers is our #1 priority. We welcome your comments and
    suggestions about how we can improve the support we provide to you. Please
    feel free to let my manager know what you think of the level of service
    provided. You can send feedback directly to my manager at:
    .

    --------------------
    >From: =?Utf-8?B?TGFycy1Fcmlr?= <>
    >Subject: RE: Possible to configure webservice to tell client to bypass prox
    >Date: Mon, 23 Jun 2008 23:40:00 -0700


    >
    >> I think you need to contact the server-side
    >> to check whether there is any intermediate proxy server or firewall that
    >> add authentication here.

    >
    >There is at the customer's offices. They'be been fiddling with bypassing

    the
    >proxy for our servers, but don't get it to work. Don't know if they do
    >something wrong.
    >
    >> FindServiceSoap myFindService = new FindServiceSoap();
    >>
    >> //this set the credentials for the service's authentication
    >> myFindService.Credentials = xxxx;
    >>
    >> WebProxy myProxy = new WebProxy("http://proxyserver:port",true);
    >>
    >> //this set the credentials for the proxy authentication
    >> myProxy.Credentials = xxxx;
    >>
    >> myFindService.Proxy = myProxy;
    >>

    >
    >That's really useful for our .net clients. :) Thanks.
    >Alas Flash don't have anything to support this.
    >
    >We're probably going to create a HTML equivalent of the web this autumn
    >anyway, so I hope they manage to configure their proxy instead of us

    fiddling
    >with the flash.
    >
    >L-E
    >
     
    Steven Cheng [MSFT], Jun 24, 2008
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Fred
    Replies:
    0
    Views:
    3,917
  2. HS1
    Replies:
    0
    Views:
    470
  3. Replies:
    0
    Views:
    4,427
  4. Replies:
    0
    Views:
    601
  5. kc

    urllib and bypass proxy

    kc, Apr 3, 2008, in forum: Python
    Replies:
    1
    Views:
    802
    Konstantin Veretennicov
    Apr 5, 2008
Loading...

Share This Page