473,386 Members | 1,693 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,386 software developers and data experts.

Redirect client webservice location at runtime - VB.Net

Hello,

I would like to programatically redirect the location of a web service from
the client machine. Let me explain further. This is the exact process:

I would like the client to click a menu bar like Tools -> Server Address
and be able to type the location of the webservice. I would then save this
data to the registry and when the client works in the application, they
would be making calls to the specified web service.

Any help would be greatly appreciated.

- Stewart
Nov 21 '05 #1
6 6025
Stewar Saathoff wrote:
I would like to programatically redirect the location of a web service
from the client machine. Let me explain further. This is the exact
process:

I would like the client to click a menu bar like Tools -> Server
Address and be able to type the location of the webservice. I would
then save this data to the registry and when the client works in the
application, they would be making calls to the specified web service.

Any help would be greatly appreciated.


Just set the Url property[1] of the proxy class to whatever they enter and
you should be good to go.

HTH,
Drew

[1] http://msdn.microsoft.com/library/de....asp?frame=tru

Nov 21 '05 #2
Thanks,

I'll try that

- Stewart

"Drew Marsh" <dr****@hotmail.no.spamming.com> wrote in message
news:91*********************@msnews.microsoft.com. ..
Stewar Saathoff wrote:
I would like to programatically redirect the location of a web service
from the client machine. Let me explain further. This is the exact
process:

I would like the client to click a menu bar like Tools -> Server
Address and be able to type the location of the webservice. I would
then save this data to the registry and when the client works in the
application, they would be making calls to the specified web service.

Any help would be greatly appreciated.


Just set the Url property[1] of the proxy class to whatever they enter and
you should be good to go.

HTH,
Drew

[1]
http://msdn.microsoft.com/library/de...asp?frame=true

Nov 21 '05 #3
But can I save using the app.config file dynamically? I was unaware that
there was a function like Write App.Config...

Stewart
"Dan Rogers" <da***@microsoft.com> wrote in message
news:nh**************@cpmsftngxa10.phx.gbl...
Hi Stewart,

A word of advice about using the registry for settings. If you want to
support clients running on Citrix or similar technologies, you'll have
issues if you use the registry. A solution in this case might be to
consider using the application.config file instead.

Regards,

Dan Rogers

--------------------
From: "Stewart Saathoff" <st**@noSpam.net>
References: <OC**************@TK2MSFTNGP09.phx.gbl>
<91*********************@msnews.microsoft.com>
Subject: Re: Redirect client webservice location at runtime - VB.Net
Date: Wed, 1 Dec 2004 23:32:39 -0600
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Message-ID: <OR**************@tk2msftngp13.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.webservices
NNTP-Posting-Host: ppp53-238.accesscom.net 67.128.53.238
Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFT NGP08.phx.gbl!tk2msftngp13
phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.webservices:7745
X-Tomcat-NG: microsoft.public.dotnet.framework.webservices

Thanks,

I'll try that

- Stewart

"Drew Marsh" <dr****@hotmail.no.spamming.com> wrote in message
news:91*********************@msnews.microsoft.com. ..
Stewar Saathoff wrote:
I would like to programatically redirect the location of a web service
from the client machine. Let me explain further. This is the exact
process:

I would like the client to click a menu bar like Tools -> Server
Address and be able to type the location of the webservice. I would
then save this data to the registry and when the client works in the
application, they would be making calls to the specified web service.

Any help would be greatly appreciated.


Just set the Url property[1] of the proxy class to whatever they enter

and
you should be good to go.

HTH,
Drew

[1]

http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemwebservicesprotocolswebclientprotocolcl assurltopic.asp?frame=true


Nov 23 '05 #4
> But can I save using the app.config file dynamically? I was unaware
that there was a function like Write App.Config...


There isn't and you shouldn't. I don't think Dan was suggesting you write
to the app.config file, just get your settings from there. If you need to
write a config file you should be doing that in separate file managed per
user using something like IsolatedStorage.

HTH,
Dre

Nov 23 '05 #5
Well, that was the entire thing. I want users to be able to change the path
dynamically. What do you do in the case of CTX???
"Drew Marsh" <dr****@hotmail.no.spamming.com> wrote in message
news:10**********************@msnews.microsoft.com ...
But can I save using the app.config file dynamically? I was unaware
that there was a function like Write App.Config...


There isn't and you shouldn't. I don't think Dan was suggesting you write
to the app.config file, just get your settings from there. If you need to
write a config file you should be doing that in separate file managed per
user using something like IsolatedStorage.

HTH,
Drew

Nov 23 '05 #6
Stewart Saathoff wrote:
Well, that was the entire thing. I want users to be able to change
the path dynamically. What do you do in the case of CTX???


Like I said, you need to keep a separate config file for user settings. The
reason for this is two fold:

1) Security Settings - corporate user's often don't have access to change
files outside of their own personal folder (i.e. can't modify app.config
in program files)
2) Multiple Users - if the machine is used by more than one user, they might
have different settings. So, if you kept the settings in one file, user A
would override user B's settings. Or, worse, user A might see user B's sensitive
settings.

So for storing the custom config file you can use Isolated Storage (which
has a nice side effect of setting your app for SmartClient usage), or you
can use Environment.GetFolder with Environment.SpecialFolder.ApplicationData
and throw a custom directory in there for your product. Either way, the file
is specific to the user and you don't have to worry about security/multiple
users.

HTH,
Dre

Nov 23 '05 #7

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

Similar topics

7
by: Donna Hawkins | last post by:
I want to use javascript to redirect to a URL which has been passed as a variable (in php). I have searched but cannot find any solution. I think this code is a basic redirect: <script...
0
by: Paul | last post by:
Snippet from web.config: <startup> <supportedRuntime version="v1.0.3705" /> <requiredRuntime version="v1.0.3705" safemode="true"/> </startup> <runtime> <assemblyBinding...
10
by: Anthony Williams | last post by:
Hi gang, This one looks like a bug :o( As you may or may not know, setting session management in web.config to use cookieless sessions causes the ASP.NET runtime to munge a session ID into...
2
by: Peter McEvoy | last post by:
Folks, I've been building a Webservice API for a contract that will be exposed to the internet at large. There are two endpoints, and each endpoint contains a number of webmethods. Every...
7
by: Christian Wilhelm | last post by:
Hi! I'm trying to call a Java WebService out of a .net Client. There are two Methods, one Method requires one Parameter of type Parameter, the other Method requires one Parameter of type...
7
by: Nalaka | last post by:
Hi, I created a sinple web service that returns a dataSet. Then I created a client program that uses this web service (that returns the Dataset). My question is, how did the client figure...
0
by: Jerry Pisk | last post by:
Hi, I'm having a problem connecting a .Net client to a web service handled by jax-rpc in Java. The service is using doc/literal over http and as long as I stick to basics everything works fine....
1
by: pmasclark | last post by:
Hello, I created a web site, site A, that redirects to another web site, site B, where a simple web service is hosted. The code to call the web service is simple. oWS.AllowAutoRedirect = True...
7
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I am trying to set this up using asp code and IIS configuration. But it seems not working. Here it is the way I am doing. In IIS I set up a virtual directory with secure communication, I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...

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.