473,378 Members | 1,607 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Invalid cast expection but can't find where error is

I am in the process of upgrading my application to Visual Studio 2005 and the
..Net 2.0 Framework. When I run my application in Debug, I get several hundred
lines of the following message in the Output View:
"A first chance exception of type 'System.InvalidCastException' occurred in
mscorlib.dll"
I am never informed of where the error is being thrown. I just get several
hundred lines of the same message. Any ideas of how to resolve this? The
application seems to be running fine, but I am worried that I just haven't
found the effects yet.

Thank you,
Susan
Sep 24 '07 #1
1 1392
Susan,

If your app isn't terminating, then it is more than likely something you
don't need to worry about, as there is an exception handler that is catching
the exception and processing it. See the following thread for an
explaination about what first chance exceptions are as well as how you can
track them down:

http://forums.microsoft.com/MSDN/Sho...42215&SiteID=1

Here is some more information about first chance exceptions as well:

http://blogs.msdn.com/davidklinems/a...12/438061.aspx
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Susan" <Su***@discussions.microsoft.comwrote in message
news:6F**********************************@microsof t.com...
>I am in the process of upgrading my application to Visual Studio 2005 and
the
.Net 2.0 Framework. When I run my application in Debug, I get several
hundred
lines of the following message in the Output View:
"A first chance exception of type 'System.InvalidCastException' occurred
in
mscorlib.dll"
I am never informed of where the error is being thrown. I just get several
hundred lines of the same message. Any ideas of how to resolve this? The
application seems to be running fine, but I am worried that I just haven't
found the effects yet.

Thank you,
Susan

Sep 24 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ritche | last post by:
I have a redirect page using PerlScript titled clickthru.asp: <%@LANGUAGE="PerlScript"%> <% my $url = $Request->QueryString('url')->Item(); $Response->Redirect($url); %> I keep running into...
0
by: Alan Z. Scharf | last post by:
Win Server 2003 VS.Net 2003 --------------- 1. I'm having the same problem below on all six of my pages with a datagrid item. 2. These pages all worked fine for months until problem started....
5
by: Nick Flandry | last post by:
I'm running into an Invalid Cast Exception on an ASP.NET application that runs fine in my development environment (Win2K server running IIS 5) and a test environment (also Win2K server running IIS...
2
by: adams114 | last post by:
I am having a strange problem with invalid type casts. I am trying to update a MS SQL Database with a stored procedure. When I setup the parameters collection for the command object I get a invalid...
3
by: John Howard | last post by:
Making the following call to a local MSAccess database works fine: Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs) Dim intRows As Integer Dim strSQL As String Dim ds As New...
1
by: Hifni Shahzard | last post by:
Hi, I got a stored procedure, where it returns a value. But if I execute it. It gives an error as "Invalid cast from System.Int32 to System.Byte.". To make clear how do I execute this, below I'm...
15
by: David | last post by:
Hi, I have built a web application that will be a very high profile application. We had tested it, demonstrated it and shown that it all works. On a dress rehearsal run through, it failed...
7
by: Chris Thunell | last post by:
I'm trying to loop through an exchange public folder contact list, get some information out of each item, and then put it into a vb.net datatable. I run though the code and all works fine until i...
4
by: John Smith | last post by:
How can I allow someone to cast my C# class into System.String? Is it possible in C#? In C++ I used "operator" keyword to mark C++ member function.
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.