title: How to include "System.io" library without using Imports
body: <h2>My client workstation confirmed installed with framework 4.0 before accessing this program, but it return as below error. Can someone enlightended how to fix this problems.</h2>
  
  <p>see the end of this message for details on invoking 
  just-in-time (JIT) debugging instead of this dialog box.</p>
  
  <pre><code>************** Exception Text **************
  System.UnauthorizedAccessException: Access to the path is denied.
  at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
  at System.IO.Pipes.NamedPipeClientStream.Connect(Int32 timeout)
  at System.IO.Pipes.NamedPipeClientStream.Connect()
  at WindowsApplication1.Form1.Form1_Load(Object sender, EventArgs e) in  C:\Client_Pipe(New)\Client_Pipe(New)\client(new).vb:line 9
  at System.EventHandler.Invoke(Object sender, EventArgs e)
  at System.Windows.Forms.Form.OnLoad(EventArgs e)
  at System.Windows.Forms.Form.OnCreateControl()
  at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
  at System.Windows.Forms.Control.CreateControl()
  at System.Windows.Forms.Control.WmShowWindow(Message&amp; m)
  at System.Windows.Forms.Control.WndProc(Message&amp; m)
  at System.Windows.Forms.ScrollableControl.WndProc(Message&amp; m)
  at System.Windows.Forms.Form.WmShowWindow(Message&amp; m)
  at System.Windows.Forms.Form.WndProc(Message&amp; m)
  at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)
  at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)
  </code></pre>
  
  <h2>    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam,  IntPtr lparam)</h2>
  
  <p>My code is as below:</p>
  
  <pre><code>Imports System.IO
  
  Public Class Form1
  Dim clientpipe As System.IO.Pipes.NamedPipeClientStream
  
  
  Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
      clientpipe = New System.IO.Pipes.NamedPipeClientStream("192.168.1.1", "soohhead", Pipes.PipeDirection.InOut, Pipes.PipeOptions.None)
      clientpipe.Connect()
  
  End Sub
  
  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  
      Dim len As String, recLen As String = 0
      Dim testString() As Byte = System.Text.Encoding.GetEncoding("windows-1256").GetBytes(Me.TextBox1.Text)
      Dim recBytes(1000) As Byte, rec
  
      len = testString.Length
  
      clientpipe.WriteByte(len)
  
      ReDim Preserve testString(0 To len)
  
      clientpipe.Write(testString, 0, len)
  
      recLen = clientpipe.ReadByte()
  
      ReDim Preserve recBytes(0 To recLen)
  
      clientpipe.Read(recBytes, 0, recLen)
  
      rec = System.Text.ASCIIEncoding.ASCII.GetString(recBytes)
  
      rec = Mid(rec, 1, recLen)
      MsgBox("check received line Number :" &amp; rec &amp; " at Length: " &amp; recLen)
  
  End Sub
  
  Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)   Handles Button2.Click
  
      clientpipe.Close()
  
  End Sub
  End Class
  </code></pre>
  
  <p>I can't execute this program through client computers, but it only throw out exceptional handled message in error. Thanks to appopriate for any helps.</p>