Possible to configure webservice to tell client to bypass proxy

L

Lars-Erik

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?
 
S

Steven Cheng [MSFT]

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:
(e-mail address removed).

==================================================
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.
 
L

Lars-Erik

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
 
S

Steven Cheng [MSFT]

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:
(e-mail address removed).

==================================================
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.


--------------------
 
L

Lars-Erik

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
 
S

Steven Cheng [MSFT]

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:
(e-mail address removed).

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

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

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top