469,355 Members | 2,547 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,355 developers. It's quick & easy.

"Specified cast is not valid. " Exception after Upgrading to 1.1

I just upgraded .NET framework to 1.1 and VS.Net to 2003 version and
tried to test it out. I created an ASP.NET project using the wizard
and tried to run
it by hitting "F5". I got an exception: "Specified cast is not valid."
The only thing i put there was a "test this." inside the form. What
might be the problem here?

Thanks in advance.

The Exception:

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

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
System.Web.Configuration.HttpCapabilitiesBase.GetC onfigCapabilities(String
configKey, HttpRequest request)
System.Web.UI.Page.CreateHtmlTextWriterInternal(Te xtWriter tw,
HttpRequest request)
System.Web.UI.Page.CreateHtmlTextWriter(TextWriter tw)


Version Information: Microsoft .NET Framework Version:1.1.4322.573;
ASP.NET Version:1.1.4322.573

ASP Code:

<%@ Page language="c#" Codebehind="WebForm1.aspx.cs"
AutoEventWireup="false" Inherits="TestWeb.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name=vs_defaultClientScript content="JavaScript">
<meta name=vs_targetSchema
<body MS_POSITIONING="GridLayout">

<form id="Form1" method="post" runat="server">
test this.


Generated C# Code
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace TestWeb
/// <summary>
/// Summary description for WebForm1.
/// </summary>
public class WebForm1 : System.Web.UI.Page
private void Page_Load(object sender, System.EventArgs e)
// Put user code to initialize the page here

#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
// CODEGEN: This call is required by the ASP.NET Web Form Designer.

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
this.Load += new System.EventHandler(this.Page_Load);
Jul 21 '05 #1
0 3264

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Özden Irmak | last post: by
13 posts views Thread by Jack MacRank | last post: by
3 posts views Thread by =?Utf-8?B?UGF1bCBQcmV3ZXR0?= | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.