RE: Need for programmatic config:timeToleranceInSeconds, MaxReques

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: drkraus (drkraus_at_nospam.nospam)
Date: 12/13/04

  • Next message: Rob Thomson: "Exception Management wse2"
    Date: Mon, 13 Dec 2004 10:29:03 -0800
    
    

    Dan.

    I am not sure I understand your question concerning setting timetolerance at
    the application level. I am requesting the ability to set these kinds of
    values programmtically, or via an application config file associated with a
    DLL. This is the same as setting at the application level, so I don't
    understand your distinction.

    Also, I used reflection to set the MaxRequestBytesInLength read only
    property of the active configuration, not my own instance. It would do me no
    good to create a configuration instance myself because I didn't know how to
    make it active, in the sense that it actually affected behavior of .NET.

    Dave

    "Dan Rogers" wrote:

    > Hi Dave,
    >
    > Thanks for explaining your thoughts on this. I think I agree. In your
    > case, you are doing something a bit unexpected - making excel take an
    > in-proc control over managed code. At some point, this won't be
    > un-conventional - after such point when Excel has been redone in managed
    > code, for instance.
    >
    > I wish I had an easy answer for you. You probably have discovered that
    > using reflection may let you do the over-ride on a new instance of the
    > class - but it doesn't update the one that is being used by the CLR to
    > manage the application. So the hacking concerns there aren't as serious.
    >
    > Do you really need to set this on a per application basis? Why? Wouldn't
    > it be better to handle time-differences (if you need message time-out) at
    > the application level?
    >
    > Dan
    > --------------------
    > Thread-Topic: Need for programmatic config:timeToleranceInSeconds, MaxReques
    > thread-index: AcTdSpMp89gsN2HJSM2k0qyloyGq7Q==
    > X-WBNR-Posting-Host: 204.210.55.215
    > From: "=?Utf-8?B?ZHJrcmF1cw==?=" <drkraus@nospam.nospam>
    > References: <30AB465D-A703-4943-B259-C588C7CAE6BC@microsoft.com>
    > <EnnNGDM3EHA.3984@cpmsftngxa10.phx.gbl>
    > Subject: RE: Need for programmatic config:timeToleranceInSeconds, MaxReques
    > Date: Wed, 8 Dec 2004 09:23:03 -0800
    > Lines: 109
    > Message-ID: <1244B818-C97A-4AC0-B436-18A6C51C7AB9@microsoft.com>
    > MIME-Version: 1.0
    > Content-Type: text/plain;
    > charset="Utf-8"
    > Content-Transfer-Encoding: 7bit
    > X-Newsreader: Microsoft CDO for Windows 2000
    > Content-Class: urn:content-classes:message
    > Importance: normal
    > Priority: normal
    > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
    > Newsgroups: microsoft.public.dotnet.framework.webservices.enhancements
    > NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
    > Path:
    > cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA0
    > 3.phx.gbl
    > Xref: cpmsftngxa10.phx.gbl
    > microsoft.public.dotnet.framework.webservices.enhancements:5086
    > X-Tomcat-NG: microsoft.public.dotnet.framework.webservices.enhancements
    >
    > Hi Dan,
    >
    > Well, it did bother me a bit that I could override a read-only property
    > using reflection, but only in principle.
    >
    > A little more background:
    > In reality, I would have been satisfied if I could have created an
    > application config file for our client DLL, that is invoked as an add-in to
    > Excel. Our client group attempted this without success. They ended up
    > creating a config file (ie. appname.dll.config) that they specifically
    > query
    > to pick up their application settings. Any non-application settings that
    > are
    > present are ignored at DLL load time, and would have to be programmtically
    > set as I have described. The next alternative was to create an
    > Excel.exe.config file, which is unacceptable.
    >
    > I have been assuming that when a setting like timeToleranceInSeconds is
    > configured in a app.config file, that this setting is specific to that
    > application only. The same goes for any programmatic setting of the same
    > property by a client. If this is true, I am not sure where the concern
    > lies.
    > We are just talking about how the property is set. Now, if it is easier to
    > compromise/spoof an application program, than it is to compromise/spoof a
    > config file, then I might see a problem. This would then lead me to believe
    > that I may have indeed "hacked into" the MaxRequestLengthInBytes property
    > using reflection.
    >
    > Finally, even though there is only one of our clients per box, a per-site
    > config setting would not allow other non-related applications to use other
    > values.
    >
    > thanks, Dave
    >
    >
    >
    > "Dan Rogers" wrote:
    >
    > > Hi Dave,
    > >
    > > Interesting requirements. Would a per-site/config value for these make
    > > sense? I think the thinking right now is that these are administrator
    > > and/or business policy type settings that you may not want a programmer
    > or
    > > application to be able to override.
    > >
    > > Thoughts?
    > >
    > > Dan Rogers
    > > Microsoft Corporation
    > > --------------------
    > > Thread-Topic: Need for programmatic config:timeToleranceInSeconds,
    > > MaxRequestLen
    > > thread-index: AcTcu4f8VZA0MUw9QCyRyEgzmboVQA==
    > > X-WBNR-Posting-Host: 4.43.44.35
    > > From: "=?Utf-8?B?ZHJrcmF1cw==?=" <drkraus@nospam.nospam>
    > > Subject: Need for programmatic config:timeToleranceInSeconds,
    > MaxRequestLen
    > > Date: Tue, 7 Dec 2004 16:19:07 -0800
    > > Lines: 30
    > > Message-ID: <30AB465D-A703-4943-B259-C588C7CAE6BC@microsoft.com>
    > > MIME-Version: 1.0
    > > Content-Type: text/plain;
    > > charset="Utf-8"
    > > Content-Transfer-Encoding: 7bit
    > > X-Newsreader: Microsoft CDO for Windows 2000
    > > Content-Class: urn:content-classes:message
    > > Importance: normal
    > > Priority: normal
    > > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
    > > Newsgroups: microsoft.public.dotnet.framework.webservices.enhancements
    > > NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
    > > Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
    > > Xref: cpmsftngxa10.phx.gbl
    > > microsoft.public.dotnet.framework.webservices.enhancements:5076
    > > X-Tomcat-NG: microsoft.public.dotnet.framework.webservices.enhancements
    > >
    > > In another thread I have documented my struggle and success at finding a
    > > way
    > > to programmatically alter the read only property MaxRequestLengthInBytes
    > >
    > (Microsoft.Web.Services2.Configuration.WebServicesConfiguration.MessagingCon
    > > figuration.MaxRequestLengthInBytes)
    > > using reflection to access a private data member, in order to allow
    > larger
    > > size DIME attachements.
    > >
    > > Now I am trying to figure out how to set timeToleranceInSeconds. It seems
    > > that setting wsproxy.RequestSoapContext.Security.Timestamp.TtlInSeconds
    > > sets
    > > the defaultTtlInSeconds config parm, but that there isn't a way, that I
    > > have
    > > found to do the same for timeToleranceInSeconds. Clock drift of more than
    > 5
    > > minutes isn't too uncommon, so I was thinking of uping the value to avoid
    > > message expiration problems.
    > >
    > > Anyway, the common thread here is that, yes, this can be done in the
    > > web.config and the app.config files to solve these problems, but in my
    > > case,
    > > when the client is an Excel add-in, creating an excel.exe.config file, or
    > > altering machine.config isn't kosher since other add-ins or client users
    > > may
    > > want different settings.
    > >
    > > So I have a specific questions and a general one for any Microsoft guru's
    > > out there.
    > > 1. Specific: Is there a way to set timeToleranceInSeconds
    > programmatically?
    > > If not directly, then via reflection (the class location of the property
    > > would help me).
    > >
    > > 2. Does it make sense to request a change from Microsoft to enable better
    > > programmatic manipulation of these kinds of config parameters?
    > >
    > > thanks, Dave
    > >
    > >
    >


  • Next message: Rob Thomson: "Exception Management wse2"

    Relevant Pages

    • Re: [BUG] linux-next: Tree for May 19/20/21 - BUG at arch/x86/kernel/io_apic_64.c:353!
      ... Can you include the config when you send these, ... from next report will send across the .config file also. ... for the kernel bug discussed. ... # PCI IDE chipsets support ...
      (Linux-Kernel)
    • RE: Need for programmatic config:timeToleranceInSeconds, MaxReques
      ... using reflection, but only in principle. ... Our client group attempted this without success. ... creating a config file that they specifically query ... Is there a way to set timeToleranceInSeconds programmatically? ...
      (microsoft.public.dotnet.framework.webservices.enhancements)
    • Re: INCLUDE_CONFIG_FILE in GENERIC
      ... of having comments in the config file. ... The -C option just preserves the breakage at its 2001-2007 level. ... directives and brings in configuration file. ...
      (freebsd-arch)
    • [PATCH] make miniconfig (take 2)
      ... Add "make miniconfig", plus documentation, plus the script that creates a ... minimal mini.config from a normal .config file. ... A shell script to automatically create mini.config from a normal .config ...
      (Linux-Kernel)
    • Re: log4net mysteriously stops logging
      ... Since the guy who put the logging in did this, the rest of us just carried it through. ... We call XmlConfigurator.Configure and pass it the FileInfo object that represents the config file. ... With the debugging in log4net enabled, ...
      (microsoft.public.dotnet.general)