Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: how to programatically give assembly loaded from network the same trust as those loaded from local host?

Reply
Thread Tools

Re: how to programatically give assembly loaded from network the same trust as those loaded from local host?

 
 
Marcelo Birnbach [MS]
Guest
Posts: n/a
 
      06-27-2003
You can modify the security policy in different ways:

1. Deploying an MSI package that is created using the .NET configuration
tool

2. Use caspol.exe in a script

3. Programatically: look docs for Security.System.SecurityManager

Anyway, it's a BAD idea to change policy giving FullTrust to the
LocalIntranet! That would mean that every application coming from the
intranet will be able to do whatever in your system. Why don't you sign the
assembly and give it the appropriate set of permissions instead of
FullTrust?

Thanks,
Marcelo


"JS" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> But within the server process running on local process, I guess that I can
> the grant permission to the assembly before loading it. How do I do it
> programatically?
>
> "Michel Gallant" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Of course, the assembly can't dynamically grant itself whatever

> permissions
> > it wants. Otherwise CAS wouldn't be of much use.
> > You can programatically configure the security policy, and then

distribute
> > is as an MSI installer to end users.
> > This process, with useful code samples is described at:
> >
> >

>

http://msdn.microsoft.com/library/de...us/dnforms/htm
> l/winforms11122002.asp
> >
> > - Michel Gallant
> > MVP Security
> >
> > "JS" <(E-Mail Removed)> wrote in message

> news:%(E-Mail Removed)...
> > > I have a .net assembly accesing COM service, the .net assembly resides

> on
> > > network drive. When the assembly is run, I got 'securitypermission'
> > > exception. If in '.net wizard->adjust .net security->adjust the

> security
> > > level for each zone', I gave 'local intranet' zone 'full trust'; the

> same as
> > > for 'my computer' zone, then there is no such exception.
> > >
> > > How do I programatically do so? When I load the assembly (and run the
> > > assmbly) in a program, I would like to give this assemnly full trust

in
> this
> > > program so that it can access COM service.
> > >
> > > If this assembly is not using COM service, I think that there won't be

> such
> > > a problem.
> > >
> > > Thanks.
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Full trust and medium trust in .net and websites Linda ASP .Net Security 1 08-31-2006 05:16 AM
Good news to all those who are seeking for job in dotnet(Only those who are leaving in Hyderabad -India) BinnuChowdary ASP .Net 1 05-02-2006 06:42 AM
Good news to all those who are seeking for job in dotnet(Only those who are leaving in Hyderabad -India) BinnuChowdary ASP .Net 0 05-02-2006 04:13 AM
Good news to all those who are seeking for job in dotnet(Only those who are leaving in Hyderabad -India) BinnuChowdary ASP .Net 1 05-01-2006 01:03 PM
Trust an assembly to work in a network Diego F. ASP .Net 0 05-23-2005 08:44 AM



Advertisments