Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspdotnet_website_programming thread: Page Error


Message #1 by "Andrew Pasetti" <andrewpasetti@y...> on Thu, 5 Sep 2002 21:09:00
When trying to access the default users 
page "thephile/Modules/Users/Admin/Default.aspx" I get the error pasted 
below. All the other modules appear to work fine. Can someone please 
suggest a fix -- this module is an important learning tool.

Thanks,

Andrew



Page Error

---------------------------------------------------------------------------
-----
An unexpected error has occurred on this page. The system administrators 
have been notified. Please feel free to contact us with the information 
surrounding this error.
The error occurred in: 
http://localhost/thephile/Modules/Users/Admin/Default.aspx
Error Message: Specified cast is not valid.
---------------------------------------------------------------------------
-----
Stack Trace:
System.InvalidCastException: Specified cast is not valid. at 
Wrox.WebModules.Accounts.Web.Admin_Default.Page_Load(Object sender, 
EventArgs e) in C:\wrox\ThePhile\Modules\Users\Admin\Default.aspx.cs:line 
28 at System.EventHandler.Invoke(Object sender, EventArgs e) at 
System.Web.UI.Control.OnLoad(EventArgs e) at 
System.Web.UI.Control.LoadRecursive() at 
System.Web.UI.Page.ProcessRequestMain()
Message #2 by "Mike Gale" <info@d...> on Fri, 6 Sep 2002 08:03:48 +1200
I suggest looking at the line mentioned and working through the cast and
the type system to establish what is happening.

(While doing that have a look as the "as" keyword which gives you
another approach, returns null rather than throwing an exception.)

Mike Gale, Decision Engineering (NZ) Ltd.

>Subject: [aspdotnet_website_programming] Page Error
>EventArgs e) in
C:\wrox\ThePhile\Modules\Users\Admin\Default.aspx.cs:line 
>28 at System.EventHandler.Invoke(Object sender, EventArgs e) at 


  Return to Index