This is cheesy, but it is the only method I have gotten to work. Create a ‘fake’ client and connect to your named pipe to move past the WaitForConnection. Works every time.
Also, even Thread.Abort() did not fix this issue for me.
_pipeserver.Dispose();
_pipeserver = null;
using (NamedPipeClientStream npcs = new NamedPipeClientStream("pipename"))
{
npcs.Connect(100);
}
Related Contents:
- Will the IE9 WebBrowser Control Support all of IE9’s features, including SVG?
- Creating a byte array from a stream
- Creating a DateTime in a specific Time Zone in c#
- How can I convert an integer into its verbal representation?
- Why Response.Redirect causes System.Threading.ThreadAbortException?
- ‘Contains()’ workaround using Linq to Entities?
- Conditional compilation and framework targets
- LINQ query on a DataTable
- How to detect installed version of MS-Office?
- Named string formatting in C#
- WCF named pipe minimal example
- Web Reference vs. Service Reference
- Workaround for lack of ‘nameof’ operator in C# for type-safe databinding?
- How to read an entire file to a string using C#?
- How to correctly cast a class to an abstract class when using type generics?
- Concat all strings inside a List using LINQ
- Is it possible to bind a Canvas’s Children property in XAML?
- Embedding one dll inside another as an embedded resource and then calling it from my code
- Generic method with multiple constraints
- Don’t stop debugger at THAT exception when it’s thrown and caught
- Inconsistency in divide-by-zero behavior between different value types
- How do C# Events work behind the scenes?
- How to change the color of progressbar in C# .NET 3.5?
- A method to count occurrences in a list
- How to parse a string into a nullable int
- Converting a generic list to a CSV string
- Lambda Expression using Foreach Clause [duplicate]
- Put WPF control into a Windows Forms Form?
- Possible to calculate MD5 (or other) hash with buffered reads?
- Software rendering mode – WPF
- Datagridview: How to set a cell in editing mode?
- Bind datagrid column visibility MVVM
- Is it possible to intercept Console output?
- Monitoring Garbage Collector in C#
- How do I get the Local Network IP address of a computer programmatically?
- passing values between forms (winforms)
- What is the Efficiency and Performance of LINQ and Lambda Expression in .Net?
- Operation could destabilize the runtime?
- Display progress bar while doing some work in C#?
- LINQ to SQL in and not in
- Add parameter to Button click event
- How can I join int[] to a character-separated string in .NET?
- Memcached with Windows and .NET
- Equivalent of Tuple (.NET 4) for .NET Framework 3.5
- How do I find if two variables are approximately equals?
- Multithreaded NamePipeServer in C#
- Dependency Injection wcf
- Controls in container form come over child form?
- Filling a DataSet or a DataTable from a LINQ query result set
- Serializing anonymous delegates in C#