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

Go Back  Xtreme .NET Talk > .NET > ASP.NET > 'System.InvalidCastException'


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

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
  #2  
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
Default

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

Code:
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
Reply

Bookmarks

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 11:14 PM
An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system. adalton11 Database / XML / Reporting 5 04-20-2004 02:24 PM
Method not found: System.object[] system.Runtime.InteropServices.Marshal.GetObjectsFo abhiman General 2 09-19-2003 01: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

Advertisement:







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.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
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..
subscribe