473,785 Members | 2,851 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Header problems using themes/master pages in 2.0

I have an application that works fine on localhost, but when it is deployed
to a production server, I get the following error:

Using themed css files requires a header control on the page. (e.g. <head
runat="server" />).

I am using themes and a single Master Page for the application, with the
theme being set globally in the web.config file <page theme="xxx" /> is, off
the top of my head, the markup, though don't quote me on that. ;-)

I don't get this error locally, and don't understand really what the problem
is. I am not able to add the <head> tag directly into the pages (this gives
me a validation error), and it is clearly marked in the master page,
including the runat="server" attribute.

Any ideas? I'm supposed to deploy this site by tommorow morning, sigh. ;-(

Christophe
May 31 '06 #1
2 1674
Strangely, I notice this problem only happens when I put an empty path (such
as http://server/foldername) ... if I put a full url
(http://server/foldername/default.aspx) it works fine. This is still
unacceptable to me, though, since many users will drop the page name and they
would be right to expect that raw path should work as well (and it's also
nicer to site just the path in manuals, etc.)

I noticed this because I found a site where someone else had the same
problem and made this observation:
http://community.discountasp.net/pr.aspx?f=24&m=6791
May 31 '06 #2
Hello Christophe,

Thank you for posting.

From your description, you've developed an ASP.NET 2.0 web site application
which uses a single master page and some global Theme resources(skin and
css style). This works well in development machine but failed on the
production server, correct?

According to your application's structure and scenario, I've performed som
tests in my local test environment(win dows 2003 server , .net framework
2.0/vs 2005...), however, failed to reproduce the same behavior.
Generally, such issue is likely environment specific. And I've also checked
the method involved in the error callstack you mentioned:

PageTheme.SetSt yleSheet()

It just simply check the container Page's "Header" property and the
"Header" property should have been correctly assigned for your scenario.
BTW, is the problem specific to MasterPage based pages? If you creating a
non-Master page based page (which applies some Theme and stylesheet), will
it also suffer the problem? In addition, you can try testing it on some
other server machine to see whether it occurs(confirm whether it is project
specific issue), if only on that parituclar production server, we may need
to concentrate on the ASP.NET environment on that machine.

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.)
Jun 1 '06 #3

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

Similar topics

14
2406
by: multiformity | last post by:
So I have been working on an opensource project for a while, and decided to really try to make it look better after focusing on the functionality most of this time. Up to now, I have simply used a standard ASPX page with minor modifications to it. All of my pages inherit from a "BasePage.cs" class, that handles common things like getting the user's information out of the session, determines if a page should or should not be password...
8
1993
by: Flip | last post by:
I have a website that's using Master pages (very cool). But when I put JS on there (to close the browser for example) coming from an external file, when I navigate away from the first page, the JS no longer works. Can someone explain why this is happening? How can I fix this so that the JS is generic enough to work on every aspx to be included in the external JS file? The external JS file looks like this right now function...
1
1268
by: Javier Martinez | last post by:
Hi It is possible to use images, themes and Master pages in the same time? I have my theme set in the web.config and all the pages (even my master page) of my application are loaded with my favourite look and feell, all works fine. But I want to set a image control in my master page and that the image file would be different bay each theme.
1
1339
by: Seefor | last post by:
I may be missing something, but why aren't master pages part of themes? i.e. why don't they go in the App_Themes or global Themes directory, and be referenced just by name (not full path) in the declaration for a page? That way, you can change the complete layout by just applying the theme to a page or a whole site. I know that if your master pages are XHTML, then you can change the layout significantly with CSS, but there are...
3
7067
by: johannblake | last post by:
I'm reading up on Themes and Master Pages in ASP.NET 2.0 but I cannot seem to understand what the difference between the two are. Do Master Pages essentially end up doing what Themes do? Is Themes an older part of the .NET architecutre and simply included for backward compatibility or are Themes and Master Pages two different things meant to compliment each other? Can someone give me some insight please.
1
1364
by: sbelgrave | last post by:
First off. Hats off to MS to really doing a good job of major fixes on VS 2K5. It is really a lot better. I have begun using Master Pages with Themes but am a bit confused as to how to make the CSS styles in those themes appear during development (not at run time, i know that most forums explain the css files in the themes are merged 'at run time' to make the page you view). I want to use Master Pages w/ Themes but if sadly I feel the...
7
8731
by: xkeops | last post by:
Thinking of creating a website, most of the pages will have a general toolbar menu, a content and a footer. The content will be the only one who's gonna change but the rest (header,footer) will remain the same. I am interested to know your opinions/suggestions in finding an easy way of doing it. In asp one could have something like this:
6
11542
by: G | last post by:
Hello Friend, I am newly migrated from ASP to ASP.NET. When i am using ASP i used have a folder with named includes where i store header. asp and footer.asp pages. and i use <!-- #include file ="'' --to access those files where ever in need. SO now my doubt is how to use the same thing(header & footer parts) in
8
1899
by: Jonathan Wood | last post by:
I want to dynamically set my site's theme based on a setting stored in my database. I just hooked this up but get an error that the theme can only be set in the page's PreInit event or earlier. However, it appears that Master pages do not have PreInit events. I REALLY do not want to have to stick the same code in each and every page I create. How are you folks dynamically setting themes from master pages?
0
10329
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10152
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10092
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8974
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3650
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2880
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.