R
rob
Hi. I'm using a button to pop up an openfiledialog box in a infopath form.
After I select a file valid file on the dialogbox and click ok, I get the
following error message:
System.Security.SecurityException
Request for the permission of type
System.Security.Permissions.FileIOPermission, mscorlib, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet
grantedSet, PermissionSet deniedSet, CodeAccessPermission demand,
PermissionToken permToken)
at System.Security.CodeAccessSecurityEngine.Check(PermissionToken
permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32
checkFrames, Int32 unrestrictedOverride)
at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission
cap, StackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Demand()
at System.Windows.Forms.IntSecurity.DemandFileIO(FileIOPermissionAccess
access, String fileName)
at System.Windows.Forms.FileDialog.get_FileName()
at DataUpload.DataUpload.btnBrowse_OnClick(DocActionEvent e) in D:\My
Projects\DataUpload\FormCode.vb:line 101
at
Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)
Seems like I cannot access files on the local hard drive. Maybe there's
something else I need to reference in the project? Thanks!
After I select a file valid file on the dialogbox and click ok, I get the
following error message:
System.Security.SecurityException
Request for the permission of type
System.Security.Permissions.FileIOPermission, mscorlib, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet
grantedSet, PermissionSet deniedSet, CodeAccessPermission demand,
PermissionToken permToken)
at System.Security.CodeAccessSecurityEngine.Check(PermissionToken
permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32
checkFrames, Int32 unrestrictedOverride)
at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission
cap, StackCrawlMark& stackMark)
at System.Security.CodeAccessPermission.Demand()
at System.Windows.Forms.IntSecurity.DemandFileIO(FileIOPermissionAccess
access, String fileName)
at System.Windows.Forms.FileDialog.get_FileName()
at DataUpload.DataUpload.btnBrowse_OnClick(DocActionEvent e) in D:\My
Projects\DataUpload\FormCode.vb:line 101
at
Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)
Seems like I cannot access files on the local hard drive. Maybe there's
something else I need to reference in the project? Thanks!