Questions tagged [argumentexception]

An ArgumentException is a specific exception in the .NET framework thrown when one of the arguments provided to a method is not valid.

From MSDN:

ArgumentException is thrown when a method is invoked and at least one of the passed arguments does not meet the parameter specification of the called method.

232 questions
0
votes
1 answer

EventLog WriteEntry() argumentException error with .net 4.5

since I have migrated my code to .net 4.5, I get errors when I try to write eventLog with eventID > 65535 here is my code where iID is > 65535: System.Diagnostics.EventLog appLog = new System.Diagnostics.EventLog(); appLog.Source = "my source"; …
Denfer06
  • 25
  • 5
0
votes
2 answers

TypeInitializationException/ArgumentException when referencing initialized variable

I just received an exception when I try to reference a static variable in another class, which is also statically initialized. This worked before, and for some reason it fails now. The only changes I made were resetting Visual Studio (2010) to its…
Yeehaw
  • 105
  • 2
  • 11
0
votes
1 answer

Connect database stored procedure by ADO.NET

Hello during connect Database I got some error connect to database (System.ArgumentException) using ADO.NET. There are some complicated parameter setting Please check below coding. ObjectParameter objp = new ObjectParameter("30",…
clear.choi
  • 835
  • 2
  • 6
  • 19
0
votes
1 answer

How to Ignore Illegal Characters in Path when using StreamWriter?

Full code at bottom. I've been getting an ArgumentException: "Illegal characters in path" whenever I attempt to save my text file in the program I've created. My thoughts are that it has something to do with the directory path(path is chosen by user…
Robert Montz
  • 163
  • 1
  • 1
  • 9
0
votes
1 answer

Illegal Characters in Path Error When Downloading CSV File

I need download a CSV file and then read it. Here is my code: tickerValue = "goog" Dim strURL As String = "http://ichart.yahoo.com/table.csv?s=" & tickerValue Dim strBuffer As String = RequestWebData(strURL) Using streamReader = New…
gromit1
  • 577
  • 2
  • 14
  • 36
0
votes
1 answer

ArgumentException was unhandled while parsing XML file

My Goal: I want to parse XML file for "REGISTRATION_CATALOGNUMBER" which is 987654 and display it in a textbox. My XML file looks like this: