Link to home
Create AccountLog in
Avatar of RadhaKrishnaKiJaya
RadhaKrishnaKiJaya

asked on

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

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.
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

need a lot more information
Avatar of RadhaKrishnaKiJaya
RadhaKrishnaKiJaya

ASKER

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
looks like you've been trying to switch themes:

copy back your XXXTheme and run your project, then switch themes.
What is Theme?  Where can I find my XXXTheme?  Where do I need to copy it?  Thank you disrup:.
check your web.config to see if you have anything that says XXXTheme.

Themes just control the way your pages and controls look.
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>
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.
I see there are subfolders like img, Images, Styles etc.  Thank you.
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
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\...
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.
ASKER CERTIFIED SOLUTION
Avatar of RadhaKrishnaKiJaya
RadhaKrishnaKiJaya

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Please read the resolution, which I have already mentioned.