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
2
votes
3 answers

Argument Exception: Empty path not allowed

I want to access the .txt file inside a Resources folder by the following code void Start () { TextAsset txtAsset = (TextAsset)Resources.Load("Dialogue0", typeof(TextAsset)); string dialogue = txtAsset.text; lines = new…
Eve
  • 43
  • 1
  • 10
2
votes
2 answers

Why is HttpNotificationChannel.Open throwing ArgumentException() E_INVALIDARG?

Here is my code. Everything works fine the first time I run it, i.e. HttpNotificationChannel.Find() returns null. But the second time I run it, Find() returns the proper thing, however when I get to the Open() call, it throws an exception. Which is…
i_am_jorf
  • 53,608
  • 15
  • 131
  • 222
2
votes
1 answer

Why doesn't it work to put minimum 100 on stepper class in Xamarin?

I don't understand why I got this message. I asked someone, he said that it doesn't like 100, but I still wonder why.
lulu
  • 31
  • 1
  • 5
2
votes
1 answer

System.ArgumentException, when passing parameter using InvokeApiAsync ()

Attempting to pass some parameters to my custom API running on azure mobile service, using a List reference and Object to sent as parameters.Then I'm facing this Error. Could not determine JSON object type for type App7.DataModels.FriendCircle.…
TheLoneWolf91193
  • 415
  • 7
  • 19
2
votes
1 answer

DotNetNuke Exception in DotNetNuke.Entities.Users.UserInfo.get_Social()

just recently started getting a "System.ArgumentException: An item with the same key has already been added." with the following stack trace. System.ArgumentException: An item with the same key has already been added at…
spankmaster79
  • 21,555
  • 10
  • 42
  • 73
2
votes
1 answer

SslStream error: Stream was not writable

I'm facing a strange error. Following code is always throwing exception (System.ArgumentException "Stream was not writable"): TcpClient socket = new TcpClient(); socket.Connect("serverIp", serverPort); //wrap networkstream with ssl SslStream…
Diallo
  • 109
  • 1
  • 9
2
votes
1 answer

Custom task runner method throws ArgumentException

Because of the fact that CultureInfo is not being copied from thread to thread I have made following method to do that thing for me. public static StartCustomTask(Action action, TaskCreationOptions tco = TaskCreationOptions.None) { var…
Dimitri
  • 2,798
  • 7
  • 39
  • 59
2
votes
1 answer

Oracle Client throws ArgumentException with ulong parameter

I need to insert a ulong (i.e., UInt64) number into an Oracle database, but am running into an ArgumentException. I'm inserting it into a NUMBER column, which I have assured myself should be able to store any number from 0 to 2^64-1. Here is a…
Jay Sullivan
  • 17,332
  • 11
  • 62
  • 86
2
votes
1 answer

WriteableBitmapRenderer.RenderAsync() ArgumentException "Value does not fall within the expected range"

I'm developing a WP8 app using Nokia Imaging SDK. I'm trying to add filter effect to an image and render it into a WriteableBitmap. Here is my code: private async void PhotoChosen(object sender, PhotoResult photoResult) { if (photoResult…
2
votes
1 answer

ArgumentException {token} while deserializing using protobuf.net

I was using protobuf-net for serialization and deserialization. The method i was following is creating a RuntimeTypeModel and adding all the types that needs to be serialized or to be supported for seralization. Upon adding all the types, i am…
Rahul W
  • 833
  • 11
  • 26
2
votes
5 answers

C# - Regexp - ArgumentException

i want to match coordinates from a Browsergame. My Regex is: try { Regex r = new Regex("Mond ([1-9]) \x5B([1-9]):([1-9][0-9]{0,2}):([1-9][0-9]{0,2})\x5D"); Match m = r.Match("Mond 1 [1:1:1]"); } …
user228644
2
votes
1 answer

C# resize generated image; bitmap, argument exception

I have an Image object that I'm trying to resize from a picture box via Bitmap. I have a source to the picture box on my desktop and the code is as follows Bitmap image = new Bitmap(pictureBox1.Image); Size newSize = new Size(100,100); image =…
fifamaniac04
  • 2,343
  • 12
  • 49
  • 72
2
votes
1 answer

Access Database connection string error

So I'm making a website on localhost and I have a database in C:\inetpub\wwwroot\Lollipops\App_Data\lollipopDB.mdb that I need to use on my website but when I try to do a SELECT statement on it, it keeps giving me the error:…
Danni
  • 315
  • 5
  • 13
2
votes
1 answer

ArgumentException at Application.Run after bringing panel to front or changing visibility

For some reason an ArgumentException saying 'Parameter is not valid.' at Application.Run gets thrown when executing either this: private void utilsTabBtn_Click(object sender, EventArgs e) { utilitiesPanel.BringToFront(); } or this: private void…
0x47686F7374
  • 434
  • 2
  • 14
2
votes
2 answers

Argument Exception

Exception: The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid. Method where exception happened: /// /// Initializes a new DSAplcEntities object…
rikket
  • 2,357
  • 7
  • 46
  • 74