Reserved Control Names

Discussion in 'ASP .Net' started by Graham, Jun 12, 2006.

  1. Graham

    Graham Guest

    I have noticed with .Net 2.0 that there are some reserved names (obviously)
    in the framework.
    The main one I am having a problem with is "Header.ascx". This works
    pefectly during development, and straight after deployment.
    Im pretty sure the problem turns up when the application pool the website is
    sitting in recycles and somehow the the temp files can no longer be found.
    It only ever seems to be happening on this file.

    To fix it i have to either delete the temp files and recycle the app pool
    or
    make a change to the Header.ascx file itself to force the app to recompile
    and generate a new temp version of the control.

    It happens in both Website Projects and Web Application Projects as well.
    I have changed the control name to PageHeader and have not received any
    errors since.

    Any idea why this is happening?

    Graham
    Graham, Jun 12, 2006
    #1
    1. Advertising

  2. Graham

    David Hogue Guest

    Graham wrote:
    > I have noticed with .Net 2.0 that there are some reserved names (obviously)
    > in the framework.
    > The main one I am having a problem with is "Header.ascx". This works
    > pefectly during development, and straight after deployment.
    > Im pretty sure the problem turns up when the application pool the website is
    > sitting in recycles and somehow the the temp files can no longer be found.
    > It only ever seems to be happening on this file.
    >
    > To fix it i have to either delete the temp files and recycle the app pool
    > or
    > make a change to the Header.ascx file itself to force the app to recompile
    > and generate a new temp version of the control.
    >
    > It happens in both Website Projects and Web Application Projects as well.
    > I have changed the control name to PageHeader and have not received any
    > errors since.
    >
    > Any idea why this is happening?
    >
    > Graham
    >
    >


    Hi Graham,

    This seems odd to me. Header isn't a keyword that I'm aware of. One of
    my projects has a control named Header. This hasn't given me any
    problems in 1.1, 2.0 web site, or 2.0 web application.

    Is the id of the control also header? That might be conflicting with
    Page.Header...

    What language are you using? What is the error you are getting?

    --
    David Hogue
    David Hogue, Jun 12, 2006
    #2
    1. Advertising

  3. Graham

    Graham Guest

    Hi David,
    Thanks for replying.
    The id of the control is Header1 and im coding in C#.
    Im getting the following error:
    Exception type: System.IO.FileNotFoundException

    Exception message: Could not load file or assembly 'App_Web_5rrlqqwl,
    Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its
    dependencies. The system cannot find the file specified.

    Stack trace: at
    ASP.staffintranet_controls_header_ascx.__BuildControlTree(staffintranet_controls_header_ascx
    __ctrl)

    at ASP.staffintranet_controls_header_ascx.FrameworkInitialize()

    at System.Web.UI.UserControl.InitializeAsUserControlInternal()

    at System.Web.UI.UserControl.InitializeAsUserControl(Page page)

    at ASP.staffintranet_cmsmaster_master.__BuildControlHeader1()

    at
    ASP.staffintranet_cmsmaster_master.__BuildControlTree(staffintranet_cmsmaster_master
    __ctrl)

    at ASP.staffintranet_cmsmaster_master.FrameworkInitialize()

    at System.Web.UI.UserControl.InitializeAsUserControlInternal()

    at System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext
    context, VirtualPath masterPageFile, IDictionary contentTemplateCollection)

    at System.Web.UI.Page.get_Master()

    at System.Web.UI.Page.ApplyMasterPage()

    at System.Web.UI.Page.ProcessRequestMain(Boolean
    includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    Hope that helps...

    Graham


    "David Hogue" <> wrote in message
    news:UN3jg.117968$...
    > Graham wrote:
    >> I have noticed with .Net 2.0 that there are some reserved names
    >> (obviously)
    >> in the framework.
    >> The main one I am having a problem with is "Header.ascx". This works
    >> pefectly during development, and straight after deployment.
    >> Im pretty sure the problem turns up when the application pool the website
    >> is
    >> sitting in recycles and somehow the the temp files can no longer be
    >> found.
    >> It only ever seems to be happening on this file.
    >>
    >> To fix it i have to either delete the temp files and recycle the app pool
    >> or
    >> make a change to the Header.ascx file itself to force the app to
    >> recompile
    >> and generate a new temp version of the control.
    >>
    >> It happens in both Website Projects and Web Application Projects as well.
    >> I have changed the control name to PageHeader and have not received any
    >> errors since.
    >>
    >> Any idea why this is happening?
    >>
    >> Graham
    >>
    >>

    >
    > Hi Graham,
    >
    > This seems odd to me. Header isn't a keyword that I'm aware of. One of
    > my projects has a control named Header. This hasn't given me any
    > problems in 1.1, 2.0 web site, or 2.0 web application.
    >
    > Is the id of the control also header? That might be conflicting with
    > Page.Header...
    >
    > What language are you using? What is the error you are getting?
    >
    > --
    > David Hogue
    Graham, Jun 12, 2006
    #3
  4. Hi Graham,

    As for the usercontrol(ascx)'s file naming, so far I haven't found any
    definite document or existing issue addressing on such issue. And from the
    further error message and call stack you provided, the runtime error is a
    typical file/assembly not found exception. Based on my experience, there
    does exists some similiar assembly not found error in ASP.NET 2.0
    applications, however, most of them are caused by dynamically loading
    usercontrol(ascx) in page. So is the usercontrol(ascx) dynamically loaded
    or statically defined in aspx template?

    BTW, the callstack indicate that there is also master page applied in your
    application pages, I'm also suspecting whether this is also related to the
    issue. Anyway, if you feel convenient, would you consider creating a
    simplified project( with a page and usercontrol or a masterpage in
    addition) which can reproduce the error in IIS? Thus, we can perform some
    test in the local environment.

    If you have any other findings, please also feel free to post here.

    Regards,

    Steven Cheng
    Microsoft Online Community Support


    ==================================================

    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.

    ==================================================


    This posting is provided "AS IS" with no warranties, and confers no rights.



    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    Steven Cheng[MSFT], Jun 12, 2006
    #4
  5. Hi Graham,

    How are you doing on this issue or have you got any progress? As I
    mentioned in the last message, you can provide me a simplified test project
    regarding on this issue so that we can perform some local test. Anyway, if
    there is still anything we can help, please feel free to post here.

    Regards,

    Steven Cheng
    Microsoft MSDN Online Support Lead


    ==================================================

    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.

    ==================================================


    This posting is provided "AS IS" with no warranties, and confers no rights.



    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    Steven Cheng[MSFT], Jun 14, 2006
    #5
  6. Graham

    Graham Guest

    I will create a test project today.
    Should I email this to you?

    "Steven Cheng[MSFT]" <> wrote in message
    news:...
    > Hi Graham,
    >
    > How are you doing on this issue or have you got any progress? As I
    > mentioned in the last message, you can provide me a simplified test
    > project
    > regarding on this issue so that we can perform some local test. Anyway, if
    > there is still anything we can help, please feel free to post here.
    >
    > Regards,
    >
    > Steven Cheng
    > Microsoft MSDN Online Support Lead
    >
    >
    > ==================================================
    >
    > When responding to posts, please "Reply to Group" via your newsreader so
    > that others may learn and benefit from your issue.
    >
    > ==================================================
    >
    >
    > This posting is provided "AS IS" with no warranties, and confers no
    > rights.
    >
    >
    >
    > Get Secure! www.microsoft.com/security
    > (This posting is provided "AS IS", with no warranties, and confers no
    > rights.)
    >
    Graham, Jun 19, 2006
    #6
  7. Hello Graham,

    Steven will be out of office for several days. I am his back up in these
    days. Can you send me the test project? To get my actual email address,
    please remove "online" from my display email.

    Regards,

    Luke Zhang
    Microsoft Online Community Lead

    ==================================================
    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.
    ==================================================

    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    Luke Zhang [MSFT], Jun 21, 2006
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Christophe Geraud
    Replies:
    1
    Views:
    514
  2. metaperl
    Replies:
    32
    Views:
    906
    NickC
    Sep 15, 2006
  3. Delaney, Timothy (Tim)
    Replies:
    10
    Views:
    667
    Jason
    Sep 14, 2006
  4. Steve Holden
    Replies:
    0
    Views:
    394
    Steve Holden
    Sep 13, 2006
  5. Replies:
    3
    Views:
    163
    osmium
    Nov 6, 2013
Loading...

Share This Page