Different result in debug and run without debug

lyrico

New member
Joined
Oct 27, 2009
Messages
1
Programming Experience
1-3
I've been left with an application developed by another developer. The application is suppose to look through an Outlook address book and parse out some information. When I run the application in debug mode (F5), I'm prompted by the outlook security asking me if I want to allow or disallow the application from gaining access to Outlook. However, when I run the application in run without debug (ctrl+F5), I get the following error: System Error - System.Security.Permissions.SecurityPermission. Running the exe through cmd generates the same error.

The security error seems to be generated after this line of code:
Dim oApp As Outlook.Application = New Outlook.Application

Any explanation to why it would work in debug but not in run?:confused: Thanks for all your help!!
 
Top Bottom