Re: security exception when calling another dll

From: Hernan de Lahitte (hernan_at_lagash.com)
Date: 02/24/04


Date: Tue, 24 Feb 2004 16:29:07 -0300

Reading your info, its seem to be a "classic" shared file permission
problem. The #1 cause for this resides in the "Internet

Check this out:

To resolve this problem, grant the FullTrust right to the remote share:
  1.. On the Web server, open Administrative Tools, and then double-click
Microsoft .NET Framework Configuration.
  2.. Expand Runtime Security Policy, expand Machine, and then expand Code
Groups.
  3.. Right-click All_Code, and then click New.
  4.. Select Create a new code group. Give your code group a relevant name,
such as the name of the applications share. Click Next.
  5.. In the Choose the condition type for this code group list, select URL.
  6.. In the URL text box, type the path of the share in the following
format (where computername is the name of the computer that is hosting the
remote share, and sharename is the name of the share):
file:////\\computername\sharename\*7.. Click Next. On the next page, select
Use an existing permission set and then select FullTrust. Note: If you
assembly does not require FullTrust it is far better to create your own
named permission set with only the required permissions to execute all the
application.

  8.. Click Next, and then click Finish.
I hope this help.

HernanDL.

"joka" <joka2002@SEZNAM.CZ> wrote in message
news:uK9cRft%23DHA.1212@TK2MSFTNGP12.phx.gbl...
> Actually the folder is stored on our company network. And the error is
> simply "an unhandled exception of type System.SecurityException occured in
> dll"
>
> additional information: Requess failed.
> it is occured when i try to create a new instance.
> thanks
>
>
>
> "Hernan de Lahitte" <hernan@lagash.com> wrote in message
> news:Oe5FSYt#DHA.2040@TK2MSFTNGP12.phx.gbl...
> > Perhaps might be a CAS or a ACL error.
> > If you specified what kind of folder (remote or local) and what is the
> error
> > message, I could give you a more precise advice.
> >
> > HernanDL.
> >
> > "joka" <joka2002@SEZNAM.CZ> wrote in message
> > news:uArxHps%23DHA.1700@TK2MSFTNGP12.phx.gbl...
> > > Hello,
> > >
> > > I have developed an application using MsAgent technology. When I
> debugged
> > it
> > > or run it directly from my develop folder everything worked fine but
> when
> > I
> > > copied the executable and the msagent files into a different folder I
> > always
> > > got a security exceptions. Can anybody advise me what I am doing
wrong?
> > >
> > > thanks
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: Creating code groups | Setup project
    ... add a class lib to the installer project - and include its primary output ... throw new ApplicationException("Failed to find the machine policy ... // add our named permission set to the machine policy level ... // now we need to create a code group that matches all assemblies ...
    (microsoft.public.dotnet.security)
  • Re: CAS Policy issue
    ... If enterprise-specified CAS restrictions are set at the enterprise policy level, neither the machine nor user levels will be able to override the restrictions to grant additional permissions. ... Any given code group can be marked as exclusive, which will prevent code that meets the code group membership conditions from being granted any additional permissions via other groups. ... I'd really like the option to prevent the control from loading at child B level, but it seems with child C full trust, this is not possible. ... If you're trying to troubleshoot CAS permission problems, I'd recommend resetting your CAS policy. ...
    (microsoft.public.dotnet.security)
  • Re: CAS Policy issue
    ... Any given code group can be marked as exclusive ... the managed user control always runs. ... The default permission set for this code group is ... If you're trying to troubleshoot CAS permission problems, ...
    (microsoft.public.dotnet.security)
  • Re: transform problem with evidence
    ... permissions for Security, ... it is under Runtime Security ... >properties for the code group, ...
    (microsoft.public.dotnet.security)
  • Re: Adjusting security setting to run an embedded windows control in IE
    ... Do you know what code group your code is getting assigned? ... know specifically what permission is being demanded that is failing your ... >> I'm not an expect at all in Java applet security, but I do know that the ... >> on evidence it presents to the system. ...
    (microsoft.public.dotnet.security)