.config file with smart client 
Author Message
 .config file with smart client

In my application I am using .config file to get some startup values. It
does not work with smart client.
I have added a web.config in root directory and also enabled anonymous
access.
Web.Config
<configuration>
 <system.web>
  <httpHandlers>
   <remove verb="*" path="*.config" />
   <add verb="*" path="web.config" type="system.web.HttpForbiddenHandler"/>
  </httpHandlers>
 </system.web>
</configuration>

What am I doing wrong. Is there any other way doing this.



Tue, 08 Nov 2005 00:28:33 GMT  
 .config file with smart client
You can test to ensure that your configuration changes in web.config are
correct by attempting to navigate directly to your application's config file
via the browser. At least that way you'll know whether the config file can
be downloaded or not.

Another option is to run the app by using a launcher application. For an
example of one you could look here

http://www.lhotka.net/Articles.aspx?id=2f5a8115-b425-4aa1-bae2-b8f807...

This launcher transparently causes the app to use a '.remoteconfig' file
instead of '.config', thus dodging the security issue with ASP.NET.

Rocky
--
Rockford Lhotka
Author of 'Expert One-on-One Visual Basic.NET Business Objects'


Quote:
> In my application I am using .config file to get some startup values. It
> does not work with smart client.
> I have added a web.config in root directory and also enabled anonymous
> access.
> Web.Config
> <configuration>
>  <system.web>
>   <httpHandlers>
>    <remove verb="*" path="*.config" />
>    <add verb="*" path="web.config"

type="system.web.HttpForbiddenHandler"/>
Quote:
>   </httpHandlers>
>  </system.web>
> </configuration>

> What am I doing wrong. Is there any other way doing this.



Wed, 09 Nov 2005 00:34:19 GMT  
 .config file with smart client
Since you said "it does not wirk with smart client", I'll assume you are
trying to do this with a WindowsApplication.

In this case, your .config file should be named 'app.config' in your
project, and myapplicatoin.exe.config once installed.
You can use the System.Configuration.AppSettingsReader
in your app.config, put the values you want to read in...
<configuration>
    <appSettings>
        <add key="Application Name" value="MyApplication" />
    </appSettings>
</configuration>

---
David Guyer - VBQA Deployment Testing
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------

Quote:

>Subject: .config file with smart client
>Date: Thu, 22 May 2003 11:28:33 -0500
>Lines: 19
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

>Newsgroups: microsoft.public.dotnet.languages.vb
>NNTP-Posting-Host: csystemssoftware.com 65.65.13.93
>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:109519
>X-Tomcat-NG: microsoft.public.dotnet.languages.vb

>In my application I am using .config file to get some startup values. It
>does not work with smart client.
>I have added a web.config in root directory and also enabled anonymous
>access.
>Web.Config
><configuration>
> <system.web>
>  <httpHandlers>
>   <remove verb="*" path="*.config" />
>   <add verb="*" path="web.config" type="system.web.HttpForbiddenHandler"/>
>  </httpHandlers>
> </system.web>
></configuration>

>What am I doing wrong. Is there any other way doing this.



Tue, 15 Nov 2005 03:49:58 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Smart Delete Files And Smart Delete Folders Routines?

2. Smart VB Client deployed over the Web

3. Smart clients

4. Client-Side Smart Viewer is Empty

5. how to read from xml config ex: web.config

6. config file get deleted when I compile

7. several config files

8. Config File

9. reading web.config type file from windows service

10. CONFIG file rebuilt on every build

11. about app.config file

12. CONFIG files in VStudio 2003

 

 
Powered by phpBB® Forum Software