I. What happens when an exception occurs during the WebClient request in C?
Solution:
Start-> Run-> cmd-> ipconfig-release-> ipconfig-renew
You only need to fix the settings to solve the problem: netsh Winsock reset, and then restart the computer as prompted ..
2. The Inter-thread operation is invalid: access it from a thread that is not creating the control ""
Two solutions:
1.Add this sentence when the thread starts.
Control. checkforillegalcrossthreadcils =False;
2.Delegate
, In 05, each control has an invokerequired attribute ~
Check whether it is true. If yes, perform the invoke operation.
Note:
Because the first method simply disables the error prompt, there is still a problem of Cross-thread control calling. This may cause two threads to change the control status at the same time or cyclically, resulting in a thread deadlock.
The invoke method is a synchronous method, so the execution process is sequential, so there will be no exception.
The second method is to use a delegate to sort the method call time, but cannot achieve the effect of running two methods in parallel. The security is safe, but the function is also paid off.
III. The RPC server is unavailable. (Exception from hresult: 0x800706ba)
Run netsh FirewallSetService remoteadmin allows the firewall to allow remote logon, enable the firewall, and testProgramRunning properly.