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:
Private Sub cmdZone_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdZone.Click [B]odlgFreight.FileName = ""[/B] Try If CheckCarrier() = True Then odlgFreight.Filter = "Text files (*.txt; *.csv)|*.txt;*.csv" If odlgFreight.ShowDialog() = DialogResult.OK Then If odlgFreight.CheckFileExists = True Then Try CreateZones(odlgFreight.FileName, Me.cboShipType.SelectedItem, Me.cboCarrier.SelectedItem) Catch ex As Exception MessageBox.Show(ex.Message) End Try txtLog.Text = txtLog.Text & Now() & ": " & cboCarrier.SelectedItem & " Zones Created" & vbNewLine End If Else MessageBox.Show("Operation cancelled or other error", "File Selection", MessageBoxButtons.OK, MessageBoxIcon.Error) End If End If Catch ex As Exception MessageBox.Show(ex.Message) End Try End Sub




Reply With Quote