473,396 Members | 1,814 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,396 software developers and data experts.

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 1654
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(windows 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.SetStyleSheet()

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
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...
8
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...
1
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...
1
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...
3
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...
1
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...
7
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...
6
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...
8
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....
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: 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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
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,...

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.