Theme cannot be found in the application or global theme ...

RadhaKrishnaKiJaya
RadhaKrishnaKiJaya used Ask the Experts™
on
Hi Experts, I am trying to execute the website from VS2008, local PC, I am getting the above error.  Do you have any idea?  Thanks.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016

Commented:
need a lot more information

Author

Commented:
Hello ve3ofa,
Thank you for your reply.  Below is the error message I got when I tried to execute the web site.  Please let me know what else information you need.  I will provide it to you.  Thank you again.

Error Message
-------------------
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.Web.HttpException: Theme 'XXXTheme' cannot be found in the application or global theme directories.

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:


[HttpException (0x80004005): Theme 'XXXTheme' cannot be found in the application or global theme directories.]
   System.Web.Compilation.ThemeDirectoryCompiler.GetThemeBuildResultType(String themeName) +920
   System.Web.Compilation.ThemeDirectoryCompiler.GetThemeBuildResultType(HttpContext context, String themeName) +73
   System.Web.UI.Page.InitializeThemes() +8703011
   System.Web.UI.Page.PerformPreInit() +38
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +282

Commented:
looks like you've been trying to switch themes:

copy back your XXXTheme and run your project, then switch themes.
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Author

Commented:
What is Theme?  Where can I find my XXXTheme?  Where do I need to copy it?  Thank you disrup:.

Commented:
check your web.config to see if you have anything that says XXXTheme.

Themes just control the way your pages and controls look.

Author

Commented:
I could not find XXXTheme in web.config file.  However it is used in many of my .aspx and .cs files as below, just a sub folder.  Please let me know.

panel.DefaultConfiguredImageURL = "../../App_Themes/XXXTheme/img/Framework/Menu/Blank.gif";
<td><img src="../../App_Themes/XXXTheme/img/Misc/indicator-big.gif" /></td>

Commented:
Do you have anything listed under App_Themes in your project? It seems to be referencing a theme, there are many themes out there.  You can set theming to false like so:

http://msdn.microsoft.com/en-us/library/kx3kzht7.aspx

but it may not work in your instance. You either have to find the specific theme that was installed which may be difficult or remove all references towards it.

Author

Commented:
I see there are subfolders like img, Images, Styles etc.  Thank you.

Commented:
if there are subfolders and the folder XXXTheme does not exist you can try pointing to them and getting rid of the XXXTheme make sure everything is referenced correctly

Author

Commented:
The XXXTheme itselef is a subfolder under App_Themes. Below are some examples.  Thank you for your patience.
...\App_Themes\XXXTheme\img\...
...\App_Themes\XXXTheme\Images\...
...\App_Themes\XXXTheme\Skins\...
...\App_Themes\XXXTheme\Styles\...
Top Expert 2016

Commented:
here it gives some info: http://msdn.microsoft.com/en-us/library/ms247256.aspx

basically If you are testing your Web site using a local IIS Web site, open a command window and run aspnet_regiis -c to install the theme on the server running IIS.
Hi Thank you all for responding,
Basically I was missing the StartUp project.  Once I did, It picked up theme files from the right path.  This case may please be closed.  Thank you.

Author

Commented:
Please read the resolution, which I have already mentioned.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial