【发布时间】:2013-12-31 06:22:38
【问题描述】:
以下代码在 Windows 2008 上对我来说是失败的。它在 Win7 中成功。
return new Semaphore(1, 1, "my-test-semaphore");
我收到以下错误:
System.IO.IOException: The specified port does not exist.
at System.IO.Ports.InternalResources.WinIOError(Int32 errorCode, String str)
at System.IO.Ports.InternalResources.WinIOError()
at System.Threading.Semaphore..ctor(Int32 initialCount, Int32 maximumCount, String name)
at Throttle.Program.CreateSemaphore(String passthroughApplication)
at Throttle.Program.Main(String[] args)
我四处寻找,找不到解释。有人有什么想法吗?
【问题讨论】:
标签: .net semaphore ioexception