These forums are read-only and considered to be an archive. Please use the new Community for future interaction and posts.

Problem with Themed Web Site

I'm trying to install FileVista to an existing themed ASP.NET 2.0 web site created using C#. How can I make FileVista work within a themed ASP.NET 2.0 web site? FileVista refuses to run properly and gives me the following error message:

Server Error in '/fpd2185w' Application.
--------------------------------------------------------------------------------

Configuration Error 
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: Theme 'Black' cannot be found in the application or global theme directories.

Source Error: 


Line 19:   </authorization>
Line 20:   <roleManager enabled="true"/>
Line 21:         <pages styleSheetTheme="Black">
Line 22:             <controls>
Line 23:                 <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
 

Source File: W:\My Web Site\web.config    Line: 21 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433 
Andrew Newhouse 3/25/2009 7:57 PM
This is the next error message after I add Theme 'Black' in FileVista.

Server Error in '/fpd2185w' Application.
--------------------------------------------------------------------------------

Using themed css files requires a header control on the page. (e.g. <head runat="server" />). 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

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

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 


[InvalidOperationException: Using themed css files requires a header control on the page. (e.g. <head runat="server" />).]
   System.Web.UI.PageTheme.SetStyleSheet() +1998478
   System.Web.UI.Page.OnInit(EventArgs e) +2062526
   System.Web.UI.Control.InitRecursive(Control namingContainer) +321
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +834

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433 
Andrew Newhouse 3/25/2009 8:15 PM
Actually the error messages tells what's missing. Edit login.aspx and add runat="server" to the <head> tag like this:

<head runat="server" />

You may need to do the same to other aspx pages (default.aspx already has it).
Cem Alacayir 3/25/2009 8:27 PM
Indeed... and I still get the same error after doing exactly what it tells me to do. I made sure that all aspx pages contain the head tag just like you said above. Any other idea?
Andrew Newhouse 3/25/2009 9:08 PM
Did you run the configuration wizard before adding this theme setting in the web.config? If not, it will first try to run configuration.aspx and not login.aspx, then also make sure configuration.aspx contains the server head tag.
Cem Alacayir 3/25/2009 10:07 PM
I found a way to make it work without having to go through this debugging process. I just published the web site contents on the same level as the FileVista application, so the web site won't try to take over FileVista's web.config. I'll eventually play around with the theme settings to make it look pretty when I have more time.
Andrew Newhouse 3/27/2009 5:26 AM