Header problems using themes/master pages in 2.0

G

Guest

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
 
G

Guest

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
 
S

Steven Cheng[MSFT]

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.)
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top