Home All Groups Group Topic Archive Search About
Author
18 Sep 2006 9:08 PM
Terry LaBrie
I am replacing a VB6 batch program with NET 2003.  The program is launched
from a SQL Server via DTS, and the first thing the program does is read some
information from a file (DAT/INI type) residing in the same folder as the
exe.  The VB6 programs works just fine, but the NET 2003 errors out with
"System.Security.Permissions.SecurityPermission at MyProgram.basMain.ReadDAT".

What do I need to do to get access?  This server\share is readable by all
within the enterprise, so I'm guessing this is some sort of framework issue.

Thanks in advance.

--
Terry LaBrie

Author
19 Sep 2006 12:06 PM
Cowboy (Gregory A. Beamer)
Within .NEt, there are different trust levels. To bounce all over the file
system, you will have to set the trust level differently than default, which
is rather locked down. If you can GAC the component, you can easily set the
level with the .NET configuration tool. The topic to look up is "Code Access
Security" possibly with "trust levels".

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
Show quote
"Terry LaBrie" <tdlab***@discussions.microsoft.com> wrote in message
news:58DF7EEC-78C9-4673-9B94-CA972B86DD5E@microsoft.com...
>I am replacing a VB6 batch program with NET 2003.  The program is launched
> from a SQL Server via DTS, and the first thing the program does is read
> some
> information from a file (DAT/INI type) residing in the same folder as the
> exe.  The VB6 programs works just fine, but the NET 2003 errors out with
> "System.Security.Permissions.SecurityPermission at
> MyProgram.basMain.ReadDAT".
>
> What do I need to do to get access?  This server\share is readable by all
> within the enterprise, so I'm guessing this is some sort of framework
> issue.
>
> Thanks in advance.
>
> --
> Terry LaBrie

AddThis Social Bookmark Button