473,320 Members | 1,920 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

web service access - proxy server issue

Hi all,

I have an asp.net 2.0 website that accesses a locally hosted web service.
This works fine on servers that are connected to our network. However, I am
having a problem with a laptop server that I have built. The code that tries
to connect to the web service breaks if the laptop is not within our
network. Further debugging has revealed that this is due to a proxy server
issue. Our domain sets the proxy server via GPO for all machines on our
network. I have however disabled the proxy server in IE settings and have
confirmed that works. However for some reason .net does not seem to be
picking up this change and it still appears to be looking for our proxy
server even when it is not in our network i.e. remote offsite etc. I even
searched the registry for all instances of string occurence of our proxy
server and deleted them.

Any ideas?
Sep 23 '08 #1
2 2889
Hi Param,

From your description, you're encountering some problem with proxy setting
of an ASP.NET web application which access a remote webservice, correct?

As you mentioned that sometimes the webserver machine is not placed in the
domain network environment(where the proxy server is accessible),
therefore, it is reasonable that when the server is not in domain network,
the webrequest call(via webservice) which utilize the system proxy
setting(default use IE setting) will fail.

I suggest you try the following approach:

1. In web.config file, you can turn off default proxy and manually specify
a proxy(in the <system.netconfigure section):

=============
<system.net>
<defaultProxy >
<proxy usesystemdefault="false" proxyaddress="" ></proxy>
</defaultProxy>
</system.net>
==============

2. Or you can manually set a proxy for the webservice's proxy in code. e.g.

==========
basicSVC.Service1 client = new basicSVC.Service1();

client.Proxy = new WebProxy("http://myproxy");
..............
===========

For how the .NET framework detect proxy, here is a good article for your
reference:

#Take the Burden Off Users with Automatic Configuration in .NET
http://msdn.microsoft.com/en-us/magazine/cc300743.aspx
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:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
From: <pa****@community.nospam>
Subject: web service access - proxy server issue
Date: Tue, 23 Sep 2008 18:09:43 -0500

Hi all,

I have an asp.net 2.0 website that accesses a locally hosted web service.
This works fine on servers that are connected to our network. However, I am
having a problem with a laptop server that I have built. The code that
tries
to connect to the web service breaks if the laptop is not within our
network. Further debugging has revealed that this is due to a proxy server
issue. Our domain sets the proxy server via GPO for all machines on our
network. I have however disabled the proxy server in IE settings and have
confirmed that works. However for some reason .net does not seem to be
picking up this change and it still appears to be looking for our proxy
server even when it is not in our network i.e. remote offsite etc. I even
searched the registry for all instances of string occurence of our proxy
server and deleted them.

Any ideas?

Sep 24 '08 #2
Hi Param,

How are you doing?

Does the information in my last reply help you some?

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:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

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

From: st*****@online.microsoft.com ("Steven Cheng")
Organization: Microsoft
Date: Wed, 24 Sep 2008 09:32:34 GMT
Subject: RE: web service access - proxy server issue

Hi Param,

From your description, you're encountering some problem with proxy setting
of an ASP.NET web application which access a remote webservice, correct?

As you mentioned that sometimes the webserver machine is not placed in the
domain network environment(where the proxy server is accessible),
therefore, it is reasonable that when the server is not in domain network,
the webrequest call(via webservice) which utilize the system proxy
setting(default use IE setting) will fail.

I suggest you try the following approach:

1. In web.config file, you can turn off default proxy and manually specify
a proxy(in the <system.netconfigure section):

=============
<system.net>
<defaultProxy >
<proxy usesystemdefault="false" proxyaddress="" ></proxy>
</defaultProxy>
</system.net>
==============

2. Or you can manually set a proxy for the webservice's proxy in code. e.g.

==========
basicSVC.Service1 client = new basicSVC.Service1();

client.Proxy = new WebProxy("http://myproxy");
..............
===========

For how the .NET framework detect proxy, here is a good article for your
reference:

#Take the Burden Off Users with Automatic Configuration in .NET
http://msdn.microsoft.com/en-us/magazine/cc300743.aspx
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:
Sep 26 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Bill Hauver | last post by:
I am attempting to use a web service from my work pc which is behind a firewall. I have used wsdl.exe to create the web service reference class and added it to my project. (this seems to work...
18
by: jabailo | last post by:
I wrote a program that loops through a file of records. It parses each line in the file and sends them to a web service that inserts them into an AS400DB2 database using Asynch calls. This is...
0
by: George | last post by:
Hello, I'm running an ASPX application "WebApplication1" which consumes a web service (service1.asmx) hosted on a machine with IP (128.1.7.x) . The web service is located in the intranet. The...
4
by: Joe | last post by:
I'm hosting my web service on a Windows 2003 box which is remotely located. When trying to add a web reference to a C# project I get an error message 'There was an error downloading...
0
by: John Bown | last post by:
This query is similar to some others on this discussion group, but none of them were resolved! Can anybody help: The issue is related to integrated authentication. First I'll describe a simple...
12
by: Noel | last post by:
Hello, I'm currently developing a web service that retrieves data from an employee table. I would like to send and retrieve a custom employee class to/from the webservice. I have currently coded...
2
by: RdS | last post by:
Hello, I use sourcesafe and vb 2003 for my dev environment. on the sourcesafe server I also have sql2005 and reporting services installed. The web app references this sql server for db. When...
13
by: Edje.Rommel | last post by:
Hello, I've have a problem with a webservice. I just want to validate a VAT number by country code and VAT numer. The return value should be like "it's valid" and/or the name where it's...
10
by: Ben | last post by:
I'm trying to access a c# web service from a web form. I set up the web reference proxy object as follows: proxy.PreAuthenticate = true; proxy.Credentials = CredentialCache.DefaultCredentials;...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.