473,785 Members | 2,419 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2931
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(whe re 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.netconf igure section):

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

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

==========
basicSVC.Servic e1 client = new basicSVC.Servic e1();

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****@microsof t.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****@communi ty.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****@microsof t.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(whe re 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.netconf igure section):

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

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

==========
basicSVC.Servic e1 client = new basicSVC.Servic e1();

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
980
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 without a hitch). Before I use this class, I make the necessary calls to instantiate a WebProxy class and then pass in my credentials to set the WebProxy.Credentials property so I can get through the proxy server.
18
526
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 the wierd part. Say their are 500 records in the file. If I run the process once, maybe 250 will appear. If I run it a second time, maybe 400 or all the records will appear.
0
2642
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 web methods can be invoked successfully if "WebApplication1" is located in machines with the same subnet (128.1.7.x). However, it fails if "WebApplication1" is hosted on
4
2950
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 'http://mydomain.com:port/webservice.asmx' The operation has timed-out (I've tried with and without using a separate port for the service) The weird thing is the page does show up on the left side of the screen listing the available methods but the Add...
0
3597
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 scenario not involving ISA server, which works as expected: The web service is hosted on a server in the same domain as my workstation with anonymous access denied, and integrated authentication enabled. If I access the web service using the...
12
5342
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 the custom employee class and have built it as a separate library (employee.dll). This employee.dll is being referenced by both the web service and the windows application. I face the following problem when I send this class to the webservice.
2
5330
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 I compile the app on my local machine which is used for development I am able to lauch application with no problem. When I run my web app on my local machine which uses my IIS 5 (WinXP Pro) the application runs fine. But if I connect to server...
13
8467
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 registered to. To do this i can access the webservice on the following location: http://ec.europa.eu/taxation_customs/vies/api/checkVatPort A WSDL file is also available:
10
1965
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; but i get a 401 error. If I switch the IIS website from Integrated Windows Auth to Anonymous, it works... but i want it to use windows
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10148
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10091
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7499
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3646
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.