473,657 Members | 2,515 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Proxy class for web service access: target IP configurable?

Hi all,

as an absolute beginner with all web matters I'm sure there are still
many things that I do net understand yet - so please point me to the
right direction whereever you feel that I'm wrong.

I developped a web service (VS 2003, ASP.NET1.1, IIS 5.0 on Windows
2000) that does some database sync actions and which is called trough a
WLAN connection from a pocket pc (VS 2003, C#). On my development pc
everything is ok so far, I can connect and address the service which
returns what it is expected to.

My problem starts when I leave my development pc and install the web
service on the target server (a machine with a different IP address,
which should be standard for a web service): the proxy class of the
consuming application (and I think this is nothing special for a pocket
pc), which is created by adding the web reference to the targeted
service was compiled with the IP of my development computer where the
service was hosted during development - so it does not find the service
on the target server. So I have to recompile the proxy class (say: the
whole consuming app with the new IP) in order to be able to address the
server. But can it be possible that I have to know the target IP address
at compile time of my app? And furthermore that would mean that I would
have to compile one particular application for each customer, as each of
them runs the web service to be consumed on its own server with its own IP!?

Where is the point where I am going wrong or don't know how do do things
the way they are expected? Any help is appreciated!

Oh, by the way: what files (and settings?) do I have to add to my web
service setup project for that the service will run on the target
machine? I'm still a little lost with all that.

Thanks in advance.
Regards,
Roland
Mar 2 '06 #1
3 2084
Your web service proxy needs some dynamic settings, which can be read from
web.config at runtime to tell it the URL of the webservice, so you dont have
to recreate the app at deplyment time.

Take a read of this

http://pluralsight.com/blogs/drjoe/a.../08/18684.aspx

Dont forget to install; the .net runtime on the server you are deploying the
webservice onto.

--
Regards

John Timney
Microsoft MVP

"Roland Riess" <ce******@gmx.n et> wrote in message
news:uj******** ******@tk2msftn gp13.phx.gbl...
Hi all,

as an absolute beginner with all web matters I'm sure there are still many
things that I do net understand yet - so please point me to the right
direction whereever you feel that I'm wrong.

I developped a web service (VS 2003, ASP.NET1.1, IIS 5.0 on Windows 2000)
that does some database sync actions and which is called trough a WLAN
connection from a pocket pc (VS 2003, C#). On my development pc everything
is ok so far, I can connect and address the service which returns what it
is expected to.

My problem starts when I leave my development pc and install the web
service on the target server (a machine with a different IP address, which
should be standard for a web service): the proxy class of the consuming
application (and I think this is nothing special for a pocket pc), which
is created by adding the web reference to the targeted service was
compiled with the IP of my development computer where the service was
hosted during development - so it does not find the service on the target
server. So I have to recompile the proxy class (say: the whole consuming
app with the new IP) in order to be able to address the server. But can it
be possible that I have to know the target IP address at compile time of
my app? And furthermore that would mean that I would have to compile one
particular application for each customer, as each of them runs the web
service to be consumed on its own server with its own IP!?

Where is the point where I am going wrong or don't know how do do things
the way they are expected? Any help is appreciated!

Oh, by the way: what files (and settings?) do I have to add to my web
service setup project for that the service will run on the target machine?
I'm still a little lost with all that.

Thanks in advance.
Regards,
Roland

Mar 2 '06 #2
Hi John,

Sometimes I wonder why I do not find such articles, or at least hints
thereto, when searching the newsgroup archives before posting my
question. But it is not always easy to find the proper key words to find
or filter out the helping ones - like in this case.

Anyway, you really helped me a lot, this is exactly what I needed to
know, thank you!

Regards
Roland
John Timney ( MVP ) schrieb:
Your web service proxy needs some dynamic settings, which can be read from
web.config at runtime to tell it the URL of the webservice, so you dont have
to recreate the app at deplyment time.

Take a read of this

http://pluralsight.com/blogs/drjoe/a.../08/18684.aspx

Dont forget to install; the .net runtime on the server you are deploying the
webservice onto.

Mar 2 '06 #3
Roland,

Your not alone. Unless you know what your looking for its often hard to
determine the correct search terms. The guys who spend a lot of time in
these groups are familiar with many of the questions new people come up
with, so its a bit easier for us to point you in the right direction.

Glad to have helped out.

--
Regards

John Timney
Microsoft MVP

"Roland Riess" <ce******@gmx.n et> wrote in message
news:ei******** *****@TK2MSFTNG P15.phx.gbl...
Hi John,

Sometimes I wonder why I do not find such articles, or at least hints
thereto, when searching the newsgroup archives before posting my question.
But it is not always easy to find the proper key words to find or filter
out the helping ones - like in this case.

Anyway, you really helped me a lot, this is exactly what I needed to know,
thank you!

Regards
Roland
John Timney ( MVP ) schrieb:
Your web service proxy needs some dynamic settings, which can be read
from web.config at runtime to tell it the URL of the webservice, so you
dont have to recreate the app at deplyment time.

Take a read of this

http://pluralsight.com/blogs/drjoe/a.../08/18684.aspx

Dont forget to install; the .net runtime on the server you are deploying
the webservice onto.

Mar 2 '06 #4

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

Similar topics

5
3480
by: Benne Smith | last post by:
Hi, I have three enviroments; a development, a testing and a production enviroment. I'm making a big application (.exe), which uses alot of different webservices. I don't use the webservices by adding a WebReference, since it does not allow me to keep state (cookiecontainer) or to specify functions on the classes (like if i want to override the ToString() function on a class from my webservice). So the only way i can see how i can get...
3
5758
by: MIGUEL | last post by:
Hi all, I'm quite lost with how adding web references to a project creates proxy classes. I've developed a web service with two classes inside and that contains three references to three DLLs. After building it up, I've deployed it on the web server. From my Windows application, I then add a web reference to that web service.
3
9156
by: Codex Twin | last post by:
Hello apologies if this is the wrong newsgroup to be sending this to. Basically, I have an ASP.NET application that I am trying to force to use a proxy server settings. This can be done by accessing machine.config, but I do not have access to the client machine.config machine. Therefore every request made from this application must have these proxy server settings. But I am having problems writing the code for this.
0
1385
by: John O'Neill | last post by:
Hi I would like some advice on how best to use web service proxy classes. Lets say I have a web service with 3 methods to GetCustomer, DeleteCustomer and UpdateCustomer. In my client code I might have a class that will call GetCustomer and then depending on user input, I might want to DeleteCustomer or UpdateCustomer. In my client code I will need an instance of a proxy class for the web service I want to use and as I see it, there are 3...
3
5392
by: Arpan | last post by:
Web Services make use of proxy classes whose methods & properties are accessed in exactly the same way as how a normal class' methods & properties are accessed. So what for does ASP.NET generate proxy classes (using WSDL) which consume more hard disk space & resources? For e.g. consider the following code which exists in a user-defined class file: Imports System Imports System.Data
10
7114
by: roberto | last post by:
I'm to deploy a .NET DLL which internally communicates with the WS. I don't want others to see internal complexity of the web service classes generated by "Add a Web reference" VS option. As a WebSerive contains a lot of methods and different types creating a web proxy class manually is too time consuming. I tried to edit a class manually, changing the highest-level access modifiers from public to internal - this way I could use the...
2
2512
by: Peter | last post by:
Firstly let me be very clear about this, I do not want to create a web service proxy nor do I want to do anything with web services. Basically, I have a shrink wrapped desktop application which downloads data from a web site. Unfortunately the application has a fixed timeout and the web server regularly exceeds this, causing the application to shut the connection and subsequently not receive any data. The desktop application also uploads...
4
4462
by: Jon | last post by:
I wrote a VS 2005 C# express programme that accesses a web service. It works fine when there's a direct connection to the internet, but on two different PCs with internet access via a proxy, I get this exception: System.Net.WebException: The request failed with HTTP status 407: Proxy Authentication Required. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream...
2
2923
by: | last post by:
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...
0
8305
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
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
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
8503
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
7324
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
6163
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
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1953
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.