Cast Error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I copied my .NET Application from a W2K SP4, SQL2000 to a W2K3, SQL2000 Server.
When i try to run the application, i get the following error:
-------------------------------------------------------------------------
Server Error in '/ApplicationName' Application.
Specified cast is not valid
Description: An unhandled exception occured during of the
current web request. Please review the stack for more .....
Exception Details: System.InvalidCastException: Specified
cast is not valid.
-------------------------------------------------------------------------

On the old Server everything works fine.
Any idea?

Thanks a lot
Chris
 
Chris Kramann said:
Hi

I copied my .NET Application from a W2K SP4, SQL2000 to a W2K3, SQL2000 Server.
When i try to run the application, i get the following error:
-------------------------------------------------------------------------
Server Error in '/ApplicationName' Application.
Specified cast is not valid
Description: An unhandled exception occured during of the
current web request. Please review the stack for more .....
Exception Details: System.InvalidCastException: Specified
cast is not valid.

Did the server move also move it from .net 1.0 to .net 1.1? It is possible
that this is related to one of the breaking changes.
 
Chris Kramann said:
Yes, the server moved from .net 1.0 to .net 1.1.

But what could be the problem?

Can you post the full error message? It should tell you what is actually
causing the problem.
 
Here is the full error message:

Server Error in '/Timesheet' Application.
--------------------------------------------------------------------------------
Specified cast is not valid.
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.InvalidCastException: Specified cast is not valid.
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:
[InvalidCastException: Specified cast is not valid.]
System.Web.Configuration.HttpCapabilitiesEvaluator.Evaluate(HttpRequest request) +493
System.Web.Configuration.HttpCapabilitiesBase.GetConfigCapabilities(String configKey, HttpRequest request) +43
System.Web.HttpRequest.get_Browser() +143
System.Web.UI.WebControls.BaseValidator.DetermineRenderUplevel() +68
System.Web.UI.WebControls.BaseValidator.OnPreRender(EventArgs e) +27
System.Web.UI.Control.PreRenderRecursiveInternal() +62
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Page.ProcessRequestMain() +1489
 
Chris Kramann said:
Here is the full error message:

Server Error in '/Timesheet' Application.
-------------------------------------------------------------------------- ------
Specified cast is not valid.
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.InvalidCastException: Specified cast is not valid.
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:
[InvalidCastException: Specified cast is not valid.]
System.Web.Configuration.HttpCapabilitiesEvaluator.Evaluate(HttpRequest request) +493
System.Web.Configuration.HttpCapabilitiesBase.GetConfigCapabilities(String
configKey, HttpRequest request) +43

Would appear to be a config file problem. I'd try comparing your web.config
file to a fresh v1.1 config file. I know there were a few changes, but I
cannot find documentation on them and no longer remember what they were.
 
Back
Top