Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB 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 July 23rd, 2010, 09:01 PM
Authorized User
 
Join Date: Jun 2010
Posts: 27
Thanks: 8
Thanked 0 Times in 0 Posts
Default How to refresh the Explorer

Does someone have a clue what is wrong with my explores or how to reset it.
I am getting the following error:

I have already correct the spelling mistake which was:

DrakGrey instead of DarkGrey

But still when i request the Defaul.aspx in explorer it give the same page.

i have already refresed it many time and even restarted the application as well.

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

Theme 'DrakGrey' 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 'DrakGrey' 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 'DrakGrey' cannot be found in the application or global theme directories.]
System.Web.Compilation.ThemeDirectoryCompiler.GetT hemeBuildResultType(String themeName) +934
System.Web.Compilation.ThemeDirectoryCompiler.GetT hemeBuildResultType(HttpContext context, String themeName) +73
System.Web.UI.Page.InitializeThemes() +8871714
System.Web.UI.Page.PerformPreInit() +38
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +328
 
Old July 24th, 2010, 05:14 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 there,

You could delete all the cookies in your browser (through the Options dialog, or by using the Developer Toolbar (when using IE; press F12)).

Alternatively, you can wrap the code in a try/catch block. The book contains a forward reference to chapter 18 that digs deeper into error handling. For now, you could try changing the line that set the Theme to something like this in the BasePage:

Code:
C#
try
{
  Page.Theme = preferredTheme.Value;
}
catch 
{
  Request.Cookies.Remove("PreferredTheme");
}
 
VB
Try
  Page.Theme = preferredTheme.Value
Catch
  Request.Cookies.Remove("PreferredTheme")
End Try
This code tries to set the Theme, and then deletes the cookie when that fails, as it's likely that the cookie contains a value without a matching theme.

Hope this helps,

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!
The Following User Says Thank You to Imar For This Useful Post:
tariq (July 24th, 2010)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Refresh GridView Using Refresh Button msbsam ASP.NET 2.0 Professional 0 December 6th, 2006 05:57 AM
Resize IE explorer saban ASP.NET 1.0 and 1.1 Basics 2 August 28th, 2006 09:01 AM
Internet Explorer JelfMaria VB How-To 10 April 27th, 2005 03:58 PM





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