I have been having an error when trying to write this program. Does anyone know how to help?
the error is:
Security Exception was unhandled:
Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
here is the exact program:
--------------------------------------------------------------------------
Imports System.Security.Permissions.FileIOPermission
Public Class Form1
Private Sub saved_files_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Browse.Click
<SerializableAttribute> _
<ComVisibleAttribute(True)> _
<AttributeUsageAttribute(AttributeTargets.Assemb ly Or AttributeTargets.Class Or AttributeTargets.Struct Or AttributeTargets.Constructor Or AttributeTargets.Method, AllowMultiple := True, _
Inherited := False)> _
Public NotInheritable Class FileIOPermissionAttribute _
Inherits CodeAccessSecurityAttribute
Dim instance As Security.Permissions.FileIOPermissionAttribute
If FolderBrowserDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
TextBox1.Text = FolderBrowserDialog1.SelectedPath
End If
End Sub
Private Sub OpenFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs)
End Sub
Private Sub FolderBrowserDialog1_HelpRequest(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub ProgressBar1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProgressBar1.Click
End Sub
Private Sub FolderBrowserDialog1_HelpRequest_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FolderBrowserDialog1.HelpRequest
End Sub
End Class
---------------------------------------
when it has this error it hilights the <SerializableAttribute> _ thing
The Idea of this is a file browser that allows me to copy and paste files and folders and move them around.
If you guys want to see the whole program I can send you the file just give me your email address.
the error is:
Security Exception was unhandled:
Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
here is the exact program:
--------------------------------------------------------------------------
Imports System.Security.Permissions.FileIOPermission
Public Class Form1
Private Sub saved_files_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Browse.Click
<SerializableAttribute> _
<ComVisibleAttribute(True)> _
<AttributeUsageAttribute(AttributeTargets.Assemb ly Or AttributeTargets.Class Or AttributeTargets.Struct Or AttributeTargets.Constructor Or AttributeTargets.Method, AllowMultiple := True, _
Inherited := False)> _
Public NotInheritable Class FileIOPermissionAttribute _
Inherits CodeAccessSecurityAttribute
Dim instance As Security.Permissions.FileIOPermissionAttribute
If FolderBrowserDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then
TextBox1.Text = FolderBrowserDialog1.SelectedPath
End If
End Sub
Private Sub OpenFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs)
End Sub
Private Sub FolderBrowserDialog1_HelpRequest(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub ProgressBar1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProgressBar1.Click
End Sub
Private Sub FolderBrowserDialog1_HelpRequest_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FolderBrowserDialog1.HelpRequest
End Sub
End Class
---------------------------------------
when it has this error it hilights the <SerializableAttribute> _ thing
The Idea of this is a file browser that allows me to copy and paste files and folders and move them around.
If you guys want to see the whole program I can send you the file just give me your email address.