Issue with SecurityPermission

From: Francisco C (franciscojanes@hotmail.com)
Date: 01/09/03


From: "Francisco C" <franciscojanes@hotmail.com>
Date: Thu, 9 Jan 2003 11:58:30 -0000


Hi,

I am trying to run a VB App. that processes Excel files.

When I run the Executable from the \bin directory using the command line, it
will tell me that the file \\share\file.xls cannot be found (which is ok,
since I donīt want it to access the files yet)

However, if I share the Executable and then run it from the shared location
(again using the command line) I get a completely new Exception:

----------------------------------------------------------------------------
-------------------------------
Unhandled Exception: System.Security.SecurityException:
System.Security.Permissions.SecurityPermission
 at VBXL.module1.Main() in D:\Visual Studio .NET\VBXL\Module1.vb:line 12

Here is Line 12: Dim app As New Excel.Application()

The state of the failed permission was:
<IPermission class="System.Security.Permissions.SecurityPermission,
mscorlib, Ve
rsion=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
             version="1"
             Flags="UnmanagedCode"/>

----------------------------------------------------------------------------
--------------------------------

This results in no one being able to execute the application from that
shared location....not even myself.

Help is appreciated.

Fran C



Relevant Pages

  • Re: Problem when executing application from batch file
    ... >buffer and execute one by one ... >that the comands (multi-commands from batch file) are sent. ... >multi-commands, then the first command will invoke the application and the ... If you write a tiny stripped down loader for your App and use: ...
    (microsoft.public.vb.general.discussion)
  • Re: WScript.Shell.Exec().StdOut.AtEndOfStream waits for text - solution - ExecWithTimeout.ws
    ... Execute the monitor. ... Read output from the app. ... Read output from the monitor. ... execute a Windows command, copying stdout and stderr. ...
    (microsoft.public.scripting.jscript)
  • Re: Sending Email from Inherited TraceListener Class
    ... >I get the following message when the SmtpMail.Send command tries to ... > Joe Micheli CPA, CMA, CFM, CPIM ...
    (microsoft.public.dotnet.general)
  • Re: Definitely a Newbie--Need an example
    ... bought a used VBS book harking back to 1999. ... I'll look again at was said, but I think to execute a abc.vbs file, I'd have to get into command code enter wscript.exe abc.vbs. ... I'm using a scientific app that allows one to extend facilities of the app by executing vbs files from it The user invokes a RunVBScript command. ...
    (microsoft.public.scripting.vbscript)
  • Sending Email from Inherited TraceListener Class
    ... I get the following message when the SmtpMail.Send command tries to execute: ... An unhandled exception of type 'System.Web.HttpException' occurred in ... Joe Micheli CPA, CMA, CFM, CPIM ...
    (microsoft.public.dotnet.general)