LabVIEW

cancel
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)

Solved!
Go to solution

an error occurs when trying the detect function using system.net.sockets 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 Untitled.vi

 

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

 

socket.png

 

 


"I think therefore I am"
0 Kudos
Message 1 of 4
(2,998 Views)

http://msdn.microsoft.com/zh-cn/library/system.net.sockets.socket.shutdown(v=vs.100).aspx  

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
(2,980 Views)

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

 

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

 

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
(2,974 Views)
Solution
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
(2,967 Views)