Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Config settings.

    Hi.

    I have couple config setting for my Application.
    I created class with static members.

    Application_Start method reads settingg from ConfigurationSettings.AppSettings and populates static class. I just found it more convenient (since now I can have default settings).

    Does this approach have any flaws?



    Thanks.

    George.

    George Ter-Saakov Guest

  2. Similar Questions and Discussions

    1. app.config and Settings.Designer.cs
      Currently, in my project, there is a folder named "Properties" which contains one item, Settings.settings, which contains one subitem,...
    2. WebService not obeying web.config error reporting settings
      Hi I'm trying to setup a web service to run under a web-site on Windows 2003 Server . If I type the URL to the web-service in the address bar of...
    3. Web.Config / Security Settings for sites NOT on sys partition
      I have a Win2K server set up with .NET 1.1, IIS5, and I run a few development test sites on this server for deployment elsewhere. Up until now,...
    4. Web config security settings
      Hi all; I want to use user name and password in my asp.net project for all aspx files but not for asmx files. Or i want to use some files with...
    5. Transfer settings, config to new computer?
      I need to replace the XP Home that came on a computer with XP Pro. Will the Win XP Transfer Settings wizard include Dreamweaver configuration and...
  3. #2

    Default Re: Config settings.

    Downside? Just the memory taken up if you are not using the settings.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA
    Author: ADO.NET and XML: ASP.NET on the Edge

    ************************************************** **************************
    ****
    Think Outside the Box!
    ************************************************** **************************
    ****
    "George Ter-Saakov" <we@hotmail.com> wrote in message
    news:%23bf1DMgSDHA.2092@TK2MSFTNGP10.phx.gbl...
    Hi.

    I have couple config setting for my Application.
    I created class with static members.
    Application_Start method reads settingg from
    ConfigurationSettings.AppSettings and populates static class. I just found
    it more convenient (since now I can have default settings).
    Does this approach have any flaws?

    Thanks.
    George.


    Cowboy \(Gregory A. Beamer\) Guest

  4. #3

    Default Config settings.

    Hi george

    Can you tell me in detail why u r populating all settings
    in to static class.

    U can store all settings in application variables and use
    these variables in all the pages.


    HTH
    Ravikanth

    >-----Original Message-----
    >Hi.
    >
    >I have couple config setting for my Application.
    >I created class with static members.
    >
    >Application_Start method reads settingg from
    ConfigurationSettings.AppSettings and populates static
    class. I just found it more convenient (since now I can
    have default settings).
    >
    >Does this approach have any flaws?
    >
    >
    >
    >Thanks.
    >
    >George.
    >
    Ravikanth[MVP] Guest

  5. #4

    Default Re: Config settings.

    1. Performance is better when referencing variable rather than lookup in
    Collection.
    2. It makes my business classes more independent from ASPX context (which is
    more important than 1).

    They can access connection string as long as there is clsGlobal loaded.
    If I were using Application then they explicitly rely on the ASPX
    environment which makes them not pure business classes (since they have
    knowledge about GUI).


    George.



    "Ravikanth[MVP]" <dvravikanth@hotmail.com> wrote in message
    news:0a4b01c34a23$25f35280$a501280a@phx.gbl...
    > Hi george
    >
    > Can you tell me in detail why u r populating all settings
    > in to static class.
    >
    > U can store all settings in application variables and use
    > these variables in all the pages.
    >
    >
    > HTH
    > Ravikanth
    >
    >
    > >-----Original Message-----
    > >Hi.
    > >
    > >I have couple config setting for my Application.
    > >I created class with static members.
    > >
    > >Application_Start method reads settingg from
    > ConfigurationSettings.AppSettings and populates static
    > class. I just found it more convenient (since now I can
    > have default settings).
    > >
    > >Does this approach have any flaws?
    > >
    > >
    > >
    > >Thanks.
    > >
    > >George.
    > >

    George Ter-Saakov Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139