Reserved Control Names

  • Thread starter Thread starter Graham
  • Start date Start date
G

Graham

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 said:
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?
 
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
 
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.)
 
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.)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top