I'm puttint a program on my work's intranet that I would like everyone in my group to use. However I am running into a problem that doesn't seem to make sense.

The way it is supposed to work is that you click a browse button and it opens a OpenFileDialog box. You select the file you want and click on open. The path is then displayed in the textbox. Here is my code:
VB Code:
  1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  2.         If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
  3.             Try
  4.                 TextBox1.Text = OpenFileDialog1.FileName
  5.             Catch ex As Exception
  6.                 Console.WriteLine("The file cannot be read")
  7.                 Console.WriteLine(ex.Message)
  8.             End Try
  9.         End If
  10.     End Sub

As long as the application is on my hard drive, it works fine. When I put the .exe on the network, the textbox stays blank.

So I tried another thing.
VB Code:
  1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  2.         OpenFileDialog1.ShowDialog()
  3.          TextBox1.Text = OpenFileDialog1.FileName
  4.     End Sub

Again, this works fine on my hard drive. When I put the .exe on the network, I get this error message:
The application attempted to perform an operation not allowed by the security policy. The operation required the SecuriyException. To grant this application the required permission please contact your system administrator, or use the Microsoft .NET security policy administration tool.

If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will be shut down immediately.

Request for the permission of type
System.Security.Permissions.FileIOPermission, mscorlib,
PublicKeyToken=b77a5c561934e089 failed.
I have full control priveledges on this network drive. Any ideas on what gives?