473,394 Members | 1,944 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

CS0246: The type or namespace name 'TemplateContainer' could not be found


Hi!
I have a Asp.net 2.0 application that uses a masterpage. It works fine
on the development machine but when I move the app to a Win 2003 server
thinks go wrong: When I navigate to a page that uses the masterpage I
get the CS0246 error:

Compiler Error Message: CS0246: The type or namespace name
'TemplateContainer' could not be found (are you missing a using
directive or an assembly reference?)

Source Error:

Line 117: }
Line 118:
Line 119: [TemplateContainer(typeof(System.Web.UI.MasterPage) )]
Line 120:
[TemplateInstanceAttribute(System.Web.UI.TemplateIn stance.Single)]
Line 121: public virtual System.Web.UI.ITemplate
Template_ContentPlaceHolder1 {
Pages that don't use the masterpage work OK,
any ideas?

many thanks in advance

Feb 6 '06 #1
1 5700
Check the web.config file. In the <system.web><pages></pages></system.web>
section, I had the following:

<pages
buffer="true"
enableSessionState="true"
enableViewState="true"
enableViewStateMac="true"
smartNavigation="false"
autoEventWireup="true"
pageBaseType="System.Web.UI.Page"
userControlBaseType="System.Web.UI.UserControl"
validateRequest="true"
masterPageFile=""
theme="CardinalHealthTheme"
styleSheetTheme=""
maxPageStateFieldLength="-1"
compilationMode="Always"
pageParserFilterType=""
viewStateEncryptionMode="Auto"
maintainScrollPositionOnPostBack="false"
asyncTimeout="45">
<namespaces>
<clear />
</namespaces>
<tagMapping>
<clear />
</tagMapping>
</pages>

It caused the same error that you reported. If you notice, I cleared the
namespaces and tagmappings. If you remove the <clear /> from the namespaces
section, it will build again.

--
Senior .NET Consultant
Enterprise Web Services
Cardinal Solutions Group
www.cardinalsolutions.com
"ro********@gmail.com" wrote:

Hi!
I have a Asp.net 2.0 application that uses a masterpage. It works fine
on the development machine but when I move the app to a Win 2003 server
thinks go wrong: When I navigate to a page that uses the masterpage I
get the CS0246 error:

Compiler Error Message: CS0246: The type or namespace name
'TemplateContainer' could not be found (are you missing a using
directive or an assembly reference?)

Source Error:

Line 117: }
Line 118:
Line 119: [TemplateContainer(typeof(System.Web.UI.MasterPage) )]
Line 120:
[TemplateInstanceAttribute(System.Web.UI.TemplateIn stance.Single)]
Line 121: public virtual System.Web.UI.ITemplate
Template_ContentPlaceHolder1 {
Pages that don't use the masterpage work OK,
any ideas?

many thanks in advance

Mar 16 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Joe DeAngelo | last post by:
When I try to compile a source code which should normally run I got this error message error CS0246: The type or namespace name 'XmlSchemaSet' could not be found (are you missing a using...
0
by: manfred | last post by:
Hello, I have this error with C# code Compiler Error CS0246: The Type or Namespace Name <XmlNavigator> Could Not be Found or Compiler Error CS0246: The Type or Namespace Name...
1
by: Leo | last post by:
The code bellow is working when i put it all in 1 document: Main.cs ------------- using System; namespace test3 { class zzz
0
by: Leo | last post by:
Hi, The code below is working: Main.cs ------------- using System; namespace test3
1
by: Leo | last post by:
Hi, The code below is working: Main.cs ------------- using System; namespace test3
0
by: WebDev2 | last post by:
I can't get AJAX.NET Pro to work. I keep getting a Compiler Error Message: CS0246: The type or namespace name 'AjaxPro' could not be found (are you missing a using directive or an assembly...
4
by: infinetinc | last post by:
I'm receiving the following error when this site is published to the production environment: Compiler Error Message: CS0246: The type or namespace name 'GridViewHelper' could not be found (are you...
3
by: Mariano | last post by:
Greetings, I'm developing a web site in asp.net 2.0. I have class files in App_Code and they are used in aspx. Example: * App_Code ( i have users.cs containing users class, data.cs is DAL) *...
1
by: rhea06car | last post by:
i got an error massage cs0246: The type or namespace name 'StringCollection' could not be found (are you missing a using directive or an assembly reference?) heres my code: public static...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.