I have the following error generated from the tutorial for C#. This problem did not occur the first time that I compiled and ran the program. I am new to C# have no idea what to do. The following is the detail of the output.
Update: I have solved this problem for now. The project file was originally located in My Documents which is mapped and synchronized to a network drive. Once I moved the project to my hard drive, the exception no longer appears. It seems that the problem in related to running this program across the network.
Thanks,
Chris
System.Security.SecurityException was unhandled
Message="Request failed."
Source="MyTestApp"
StackTrace:
at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException)
at System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Assembly asm, SecurityAction action)
at MyTestApp.Form1.InitializeComponent()
at MyTestApp.Form1..ctor()
at MyTestApp.Program.Main()
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

Security Exception from the WEB Browser Example in VC# Express
jhermiz
misteloe
I have the same problem.
This problem was never really resolved although the submitter found a satisfactory workaround. Moving the projects folder to a local drive does not meet my needs as I store my projects under my documents which is a redirected drive on a W2K3 for SBS server and has scheduled backups (which I prefer).
Is there anyway we can reopen this problem and find the real solution to the securityexception on network drives using the C# Browser Object
This thread is also related to the following http://forums.microsoft.com/msdn/ShowPost.aspx postid=447470&isthread=true&siteid=1&authhash=4d67697d0683bdbc0e66432f1fb4e1743d83b18d&ticks=632848571363405338