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" <stew@noSpam.net>
References: <OCGVWFC2EHA.3816@TK2MSFTNGP09.phx.gbl>
<91308632375395803906250@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: <ORPZdDD2EHA.1192@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!TK2MSFTNGP08.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
> Stewar Saathoff wrote:
>
[quoted text clipped - 16 lines]
>
> [1]
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemwebservicesprotocolswebclientprotocolclassurltopic.asp?frame=true
Stewart Saathoff - 06 Dec 2004 19:47 GMT
But can I save using the app.config file dynamically? I was unaware that
there was a function like Write App.Config...
Stewart
> Hi Stewart,
>
[quoted text clipped - 59 lines]
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
> frlrfsystemwebservicesprotocolswebclientprotocolclassurltopic.asp?frame=true
Drew Marsh - 06 Dec 2004 20:03 GMT
> 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
Stewart Saathoff - 06 Dec 2004 20:42 GMT
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???
>> But can I save using the app.config file dynamically? I was unaware
>> that there was a function like Write App.Config...
[quoted text clipped - 6 lines]
> HTH,
> Drew
Drew Marsh - 06 Dec 2004 21:22 GMT
> 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