I am getting the following error message when trying to run a program over the network:


"An unhandled exception of type 'System.Security.SecurityException' occurred in mscorlib.dll"

"Additional information: Request for the permission of type System.Security.Permissions.FileIOPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed."

First, I am not the author of the code. Second, I have Admin privilges to all network drives and am a Admin on MyComputer. I have googled the error to look for problems, and most said to change settings in the .NET Framework for .NET 1.1. I did; however, I still get the same error.

VB Code:
  1. Private Sub cmdZone_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdZone.Click
  2.         [B]odlgFreight.FileName = ""[/B]
  3.         Try
  4.             If CheckCarrier() = True Then
  5.                 odlgFreight.Filter = "Text files (*.txt; *.csv)|*.txt;*.csv"
  6.                 If odlgFreight.ShowDialog() = DialogResult.OK Then
  7.                     If odlgFreight.CheckFileExists = True Then
  8.                         Try
  9.                             CreateZones(odlgFreight.FileName, Me.cboShipType.SelectedItem, Me.cboCarrier.SelectedItem)
  10.                         Catch ex As Exception
  11.                             MessageBox.Show(ex.Message)
  12.                         End Try
  13.                         txtLog.Text = txtLog.Text & Now() & ": " & cboCarrier.SelectedItem & " Zones Created" & vbNewLine
  14.                     End If
  15.                 Else
  16.                     MessageBox.Show("Operation cancelled or other error", "File Selection", MessageBoxButtons.OK, MessageBoxIcon.Error)
  17.                 End If
  18.             End If
  19.         Catch ex As Exception
  20.             MessageBox.Show(ex.Message)
  21.  
  22.         End Try
  23.  
  24.     End Sub