Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 7th, 2009, 11:38 PM
Friend of Wrox
 
Join Date: Dec 2008
Posts: 119
Thanks: 26
Thanked 0 Times in 0 Posts
Default something Weird has happened

Hello Imar:

I can no longer preview your project that I built!
I had finished all but chapters 17 & 18 and will be finishing them up soon.

But I've been working on my own website and am using some ideas from another project (beerhouse).

I just tried to open up the Planet Wrox project now, and I get the following error:
========

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

Theme 'PlainHtmlYellow' cannot be found in the application or global theme directories.
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 'PlainHtmlYellow' 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 'PlainHtmlYellow' cannot be found in the application or global theme directories.]
System.Web.Compilation.ThemeDirectoryCompiler.GetT hemeBuildResultType(String themeName) +920
System.Web.Compilation.ThemeDirectoryCompiler.GetT hemeBuildResultType(HttpContext context, String themeName) +73
System.Web.UI.Page.InitializeThemes() +8696095
System.Web.UI.Page.PerformPreInit() +38
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +282


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

==========

I had been trying to figure out why the dropdown list wouldn't show up when I switched from the template monster theme to the plain yellow theme in my own project. I had been working in my own web, and then when I needed to refer to something, I always shut my web down before opening the beerhouse project and shut it down before opening mine. This time, I shut down that Beerhouse project and opened yours because the drop down list worked fine in it. But when I tried to view my planet wrox web in the browser I got that weird message.

So I rebooted. Then after rebooting, closed all the open pages and rebuilt the project. Tried to open it again. But still this message persists. It doesn't refer to any page in the project. Is it something in the main Net files I need to do something with?

What do I do??

Rachel

Last edited by Rachel; January 7th, 2009 at 11:40 PM..
 
Old January 8th, 2009, 03:44 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Rachel,

Are both projects located in their own folder? They should be, or they would interfere with each other. If you do have separate folders, you can easily have them open together. (I often have many web site projects open in different instances of Visual Studio).

Anyway, you probably need to search for PlainHtmlYellow. I am not familiar with the Beerhouse so I don't know if that's your theme, or the Beerhouse's theme. With your project open in Visual Studio, press Ctrl+Shift+F (find in files) and search the entire site for PlainHtmlYellow. There's a fair chance it's in web.config.

If that doesn't help, you may need to widen your search on your computer to see where it comes from.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old January 8th, 2009, 10:58 AM
Friend of Wrox
 
Join Date: Dec 2008
Posts: 119
Thanks: 26
Thanked 0 Times in 0 Posts
Default

Hi Imar:

Thanks for responding. I had been careful to only have one solution open at a time for I had seen things in the past get mixed up. And I did in fact do a search for the plainyellow doing it by searching the entire solution, but nothing showed up.

I'm wondering about one thing. I couldn't get the dropdown list to show up when I switched to the plainyellow theme. So I had copied some of the code from the project I had built on your project, that creates the cookie - from page 223. I then had run the other project (my web, but using the code from beerhouse). So when I ran it, I then clicked on the plainyellow theme. I don't remember why now, but I was worried that mixing up extra code might give me problems later so I took that back out. But could I have created a cookie for plainyellow that now my planet wrox is trying to read for some reason? That error message doesn't refer to any page in that project. Could this be coming from the main .Net folder under windows like machine.config ?

RAchel

EDIT:
Update:

Hi Imar:

There are a ton of references to "PlainHtmlYellow" under my C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET Files\tbh_web\ *with various extensions here*
as well as under
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET Files\testWebSite\ *with various extensions here*
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET Files\myNewWeb\ *with various extensions here*

specifically, I looked under them here:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET Files\myNewWeb\7b620315\7d763afc
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET Files\myNewWeb\7b620315\7d763afc

Can I safely delete them?

Rachel

Last edited by Rachel; January 8th, 2009 at 11:28 AM..
 
Old January 8th, 2009, 12:30 PM
Authorized User
 
Join Date: Jan 2009
Posts: 26
Thanks: 4
Thanked 1 Time in 1 Post
Lightbulb

Quote:
Originally Posted by Rachel View Post
I can no longer preview your project that I built!
<snip>
Theme 'PlainHtmlYellow' cannot be found in the application or global theme directories.
Hi Rachel,
I had a similar problem - it had to do with cookies. I used the same code from the book for saving the selected theme in a cookie for my personal site - and as such, used the same var name for it (PreferredTheme). When you run VWD and use its built in server, the host is localhost, so the cookie is always cookie:yourusername@localhost - regardless of which site you're actually viewing at the time. The workaround for me (other than wiping out the cookie each time) was to make sure no cookie variable names overlapped between sites.

Good Luck,
Mrs. CB Spira
 
Old January 8th, 2009, 01:29 PM
Friend of Wrox
 
Join Date: Dec 2008
Posts: 119
Thanks: 26
Thanked 0 Times in 0 Posts
Default

Hi:
Thanks. How do I get rid of the cookie that is there now?
 
Old January 8th, 2009, 02:33 PM
Authorized User
 
Join Date: Jan 2009
Posts: 26
Thanks: 4
Thanked 1 Time in 1 Post
Default

In Windows XP cookies are stored in:

Code:
C:\Documents and Settings\yourusername\Local Settings\Temporary Internet Files
look for the file Cookie:yourusername@localhost

It's a text file so it will open in notepad if you want to verify that this is indeed the source of your problem...

you should be able to just delete it (or rename it if you want to preserve the contents)

I don't know where Vista stores the cookie files. If you want to get drastic you can use IE's Tools, Internet Options, General Tab, Delete... to delete all temporary files - but that's overkill, IMHO
The Following User Says Thank You to cbspira For This Useful Post:
Rachel (January 8th, 2009)
 
Old January 8th, 2009, 03:13 PM
Friend of Wrox
 
Join Date: Dec 2008
Posts: 119
Thanks: 26
Thanked 0 Times in 0 Posts
Default

OH THANKS SO MUCH!

That was really a tangled web trying to figure that out. And it was all just a cookie! I deleted that localhost cookie, and now its working fine.

edit: I see I need to change that variable name for the preferred theme if I want to store a cookie again.


Rachel

Last edited by Rachel; January 8th, 2009 at 03:16 PM..
 
Old January 8th, 2009, 04:11 PM
Authorized User
 
Join Date: Jan 2009
Posts: 26
Thanks: 4
Thanked 1 Time in 1 Post
Thumbs up

You're welcome
Yup, you have to change the variable name if you want to still use the cookie - one of the pitfalls in reusing code...
Note that this probably would not be an issue in production server since the 2 sites would most likely not live at the same domain name...
 
Old January 8th, 2009, 06:22 PM
Friend of Wrox
 
Join Date: Dec 2008
Posts: 119
Thanks: 26
Thanked 0 Times in 0 Posts
Default

I put a comment in CAPITAL letters above that snippet of code in my planet Wrox web so I would not make that mistake again!

Rachel
 
Old January 10th, 2009, 08:10 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Great; glad it's all working again now....

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird search panossss PHP How-To 1 February 21st, 2008 06:41 AM
What happened to Professional MFC lesliecarr206 C++ Programming 1 March 30th, 2007 01:02 PM
Weird Concantenation jazzcatone SQL Server 2000 1 November 14th, 2006 10:42 AM
It Happened Again - All My Subscriptions are Gone Imar Forum and Wrox.com Feedback 0 November 20th, 2003 06:02 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.