RE: Enterprise Templates and Inherited Forms using 1.5 Gig of Memory

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Niall McDonnell [MSFT] (niallm_at_online.microsoft.com)
Date: 04/26/04


Date: Mon, 26 Apr 2004 19:43:59 GMT

hi Chris,
I believe this is the bug we identified whereby the policy engine recurses
infinitely on the ErrorProvider's ContainerControlProperty. We have fixed
this in the next version of the product and are creating a KB article to
cover the current versions.

A work-around is to override the "ContainerControl" property on your
ErrorProvider to make it non-browsable:

    <System.ComponentModel.BrowsableAttribute(False)> _

    Public Overloads Property ContainerControl() As
System.Windows.Forms.ContainerControl

        Get

            Return MyBase.ContainerControl

        End Get

        Set(ByVal Value As System.Windows.Forms.ContainerControl)

            MyBase.ContainerControl = Value

        End Set

    End Property

The effect of this code is to make ContainerControl property non-browsable.
The policy engine ignores non-browsable properties.

--------------------
>From: "Chris Langston" <CLangston@horizon-boss.com>
>Subject: Enterprise Templates and Inherited Forms using 1.5 Gig of Memory
>Date: Thu, 4 Mar 2004 13:31:21 -0500
>Lines: 39
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>Message-ID: <O$$GmbhAEHA.3184@TK2MSFTNGP09.phx.gbl>
>Newsgroups:
microsoft.public.dotnet.distributed_apps,microsoft.public.dotnet.framework,m
icrosoft.public.dotnet.framework.performance,microsoft.public.vsnet.debuggin
g,microsoft.public.vsnet.enterprise.tools,microsoft.public.vsnet.general,mic
rosoft.public.vsnet.i
>NNTP-Posting-Host: horizon-boss.com 69.15.32.254
>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework:66668
microsoft.public.dotnet.framework.performance:6874
microsoft.public.vsnet.debugging:5128
microsoft.public.vsnet.enterprise.tools:1946
microsoft.public.vsnet.general:17208
microsoft.public.dotnet.distributed_apps:8603
>X-Tomcat-NG: microsoft.public.vsnet.enterprise.tools
>
> have an Enterprise Template using a Policy file that I'm experiencing some
>strange behavior with. I've racked my brain through the news groups and
all
>the examples off of MSDN, but can't seem to locate the what's causing my
>problem.
>
>We are building an enterprise application, with various types of projects
>
>Solution
> BusinessLogic
> Common
> DataAccess
> WinUI
> - UIBase
> - UIUser
>
>Everything in the templates for the PolicyFiles are working great in all
the
>projects except for my WinUI projects. We are using a BaseForm in the
>UIBase Assembly that Inherits from System.Windows.Forms.Form. All other UI
>forms in our application will inherit from BaseForm in the UIBase Assembly.
>Here we want to put in a policy that all forms must Inherit from our
>BaseForm.
>
>Here's the problem, if I have a policy file associated with my UIUser
>assembly files and I open a form that inherits from BaseForm in the UIBase
>assembly, the IDE uses up to 1.6 Gigs of Memory. Not until I close the
form
>is the memory release. I've set the Policy file to be INLUDE all types of
>components, but I still get the same behavior. If I remove the Policy file
>from the Project completely, then I don't have the problem at all.
>
>Is there a way for me to turn on logging in the IDE to see what is causing
>the IDE to use some much memory? Do you have any suggestions on what else
I
>can do to get past this problem. Right now this is pretty much a show
>stopper in regards to using the PolicyFile as developer productivity would
>be severly reduced.
>
>I'm using a P4 2.6 Gig Dell machine with 1Gig of Ram and a 60 Gig
Harddrive,
>so performance on my machine isn't the problem
>
>
>

-- 
This posting is provided "AS IS" with no warranties, and confers no rights. 
Use of included script samples are subject to the terms specified at 
http://www.microsoft.com/info/cpyright.htm 
Note:  For the benefit of the community-at-large, all responses to this 
message are best directed to the newsgroup/thread from which they 
originated.  


Relevant Pages

  • RE: Enterprise Templates and Inherited Forms using 1.5 Gig of Memory
    ... Can you try removing CODEVARIABLEelements from your policy ... What size is the code in UIBase? ... Your post seems to imply that the memory consumption only goes up when you ... >assembly files and I open a form that inherits from BaseForm in the UIBase ...
    (microsoft.public.dotnet.framework.performance)
  • Re: config tool and policy for REMOTE server
    ... Instead I created a policy file for a service on ... I have a remote web server and I have always ... Granted I'm not always going to use the config tool to write my policy files ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: [AppArmor 39/45] AppArmor: Profile loading and manipulation, pathname matching
    ... around your system you need to define policy so that your unrestricted users must have access to every label, and every time you create a new label you need to go back to all your policies to see if the new label needs to be allowed from that policy ... For example, you could set up a "logfile" attribute which allows logrotate to archive old versions and allows audit- admin users to modify/delete them, then whenever you need to add a new logfile you just declare the "my_foo_log_t" type to have the "logfile" attribute. ... My logrotate policy file would depend on the syslog policy and would declare the logrotate daemon type as a "logdaemon", and additionally allow logrotate to read, rename, append, and delete "logfile" types. ...
    (Linux-Kernel)
  • Re: Enterprise Templates and Inherited Forms using 1.5 Gig of Memory
    ... We are using VB.NET and the BaseForm is actually very ... All it contains is a basic Form and has 1 control on it. ... > policy engine to walk all code as far as types, ... if I have a policy file associated with my UIUser ...
    (microsoft.public.dotnet.framework.performance)
  • RE: How to apply SCW policy to another server?
    ... When responding to posts, please "Reply to Group" via your newsreader so ... Create the security policy file on a server that already has SCW ...
    (microsoft.public.windows.server.general)