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.
.NET ProgrammingMicrosoft IIS Web ServerASP.NET

Avatar of undefined
Last Comment
RadhaKrishnaKiJaya

8/22/2022 - Mon
David Johnson, CD

need a lot more information
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
disrupt

looks like you've been trying to switch themes:

copy back your XXXTheme and run your project, then switch themes.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
RadhaKrishnaKiJaya

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

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

Themes just control the way your pages and controls look.
RadhaKrishnaKiJaya

ASKER
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>
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
disrupt

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

ASKER
I see there are subfolders like img, Images, Styles etc.  Thank you.
disrupt

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
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
RadhaKrishnaKiJaya

ASKER
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\...
David Johnson, CD

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
RadhaKrishnaKiJaya

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
RadhaKrishnaKiJaya

ASKER
Please read the resolution, which I have already mentioned.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.