ASP.NET Topics include: System.Web classes, Web Forms and Web Controls.

Enjoy an ad free experience by logging in. Not a member yet? Register.
Go Back  Xtreme .NET Talk > .NET > ASP.NET > 'System.InvalidCastException'

Thread Tools Display Modes
Old 10-30-2003, 04:37 PM
elf_man elf_man is offline

Preferred language:
Visual Basic
Join Date: Oct 2003
Location: Mesa, AZ
Posts: 1
elf_man is on a distinguished road
Default 'System.InvalidCastException'

In working with a XML Web Service Project I got this error, entire message is:An unhandled exception of type 'System.InvalidCastException' occurred in microsoft.visualbasic.dll

Additional Info:Additional information: Cast from string "System.Web.Services.Protocols.So" to type 'Integer' is not valid.

I'm working on my 70-310 exam, please help
Reply With Quote
Old 10-30-2003, 04:40 PM
Robby's Avatar
Robby Robby is offline
Ultimate Contributor
Join Date: Nov 2002
Location: Montreal, Ca.
Posts: 3,460
Robby is on a distinguished road

At the top of each code page place the following...

Option Explicit On
Option Strict On

You're obviously trying to assign something to an Integer Variable that is not of Integer type.
Visit...Bassic Software
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Object of type 'System.DBNull' cannot be converted to type 'System.Nullable` 1[System bri189a ASP.NET 1 02-12-2006 01:45 PM
System.InvalidCastException VirusSpore General 7 08-03-2004 10:14 PM
An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system. adalton11 Database / XML / Reporting 5 04-20-2004 01:24 PM
Method not found: System.object[] system.Runtime.InteropServices.Marshal.GetObjectsFo abhiman General 2 09-19-2003 12:16 AM
An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system. KABOOM Database / XML / Reporting 4 04-04-2003 12:32 PM


Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..