Showing results for 
Search instead for 
Did you mean: 

Error 1172 occurred at Error calling method System.Net.Sockets.Socket.Shutdown, (System.ArgumentNullException: value cannot be null. parameter: key)

Go to solution

an error occurs when trying the detect function using as show in below.


Possible reason(s):

LabVIEW: A .NET exception occurred in an external assembly. For information about correcting this error, copy the following exception (in bold), and search the Microsoft Developer Network (MSDN) Web site or the Web for a possible explanation.
System.ArgumentNullException in


OS: Win7 Enterprise X64, the same code works on Win XP OS with no such error.





"I think therefore I am"
0 Kudos
Message 1 of 4

as the MSDN say, the parameter of shutdown is "SocketShutdown how". It include send, recieve and both. The error occured in shutdown?  your pic didn`t show shutdown.

0 Kudos
Message 2 of 4

it will call some property and method, and result the error:


Error creating instance of Socket in assembly System.Net.Sockets.Socket, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089, (System.Net.Sockets.SocketException: 以一种访问权限不允许的方式做了一个访问套接字的尝试。) <append><b>System.Net.Sockets.SocketException</b> in Untitled


as it failed to create the constructor, that is why it also show "shutdown how"

"I think therefore I am"
0 Kudos
Message 3 of 4
Accepted by topic author ELI2011

I have solved this issue by run the code as administrator.


anyway, thx for your response!



"I think therefore I am"
0 Kudos
Message 4 of 4