Re: code access security with URL condition

From: Sankar Nemani (snemani_at_nospamlumedx.com)
Date: 08/24/04


Date: Tue, 24 Aug 2004 13:08:55 -0700

So is there a place that discusses how the .NET framework finds the code
group when more than one code group exist?

"Nicole Calinoiu" <nicolec@somewhere.net> wrote in message
news:#PSpQHhiEHA.4056@TK2MSFTNGP09.phx.gbl...
> UrlMembershipCondition, which is the class responsible for testing whether
> evidence matches a code group URL condition, does not account for the
> multiple URLs that could be used to reach the same site. My guess would
be
> that while you were working offline, you used the various localhost,
machine
> name, and 127.0.0.1 addresses in such a way as to make some of the
controls
> source from each one. As for needing the two root/* and root/virtdir1/*
> forms, I wonder if you really need all 6 or just the 3 root variants of
the
> more suitable of the two.
>
> Either way, instead of spending time worrying about a purely dev-time
> configuration problem that you've already solved, perhaps it might be more
> worthwhile to spend some time figuring out how to get the controls to run
> without full trust...
>
>
> "Sankar Nemani" <snemani@nospamlumedx.com> wrote in message
> news:ux7TKqfiEHA.1356@TK2MSFTNGP09.phx.gbl...
> > Hi
> > We have two virtual directories in which our .NET controls reside. We
> > host these controls in IE. These controls need full trust permission
set.
> > We
> > tried to create a codegroup that has a URL condition http://localhost/*
> > and
> > gave full trust permission and tested by opening IE on the same machine
as
> > the server (that is why localhost should have been OK). Some parts of
the
> > controls worked but we got SecurityExceptions for others. We kept
getting
> > SecurityExceptions in one part or the other until we created 6 code
groups
> > with URL conditions
> > http://localhost/*
> > http://MACHINENAME/*
> > http://127.0.0.1/*
> > http://localhost/VirtDir1/*
> > http://MACHINENAME/VirtDir1/*
> > http://127.0.0.1/VirtDir1/*
> > and gave full trust for all these code groups. The computer is not on
any
> > network. When it was hooked up to the a network, we didn't need all 6
code
> > groups. It seems like the code access security mechanism is not able to
> > figure out localhost,MACHINENAME and 127.0.0.1 as the same URL.
> > I would like to understand how .NET applies these permissions and if
there
> > are any resources that discuss these things in detail.
> > TIA
> > Sankar Nemani
> >
> >
> >
>
>



Relevant Pages

  • Re: .NET Security Question
    ... which allow the controls in that assembly to run. ... I did not create a code group ... When I run the EXE it also allows the ... > to give it permissions. ...
    (microsoft.public.dotnet.security)
  • Re: code access security with URL condition
    ... and 127.0.0.1 addresses in such a way as to make some of the controls ... These controls need full trust permission set. ... > tried to create a codegroup that has a URL condition http://localhost/ * ... > and gave full trust for all these code groups. ...
    (microsoft.public.dotnet.security)
  • Re: CASPOL - StrongName trusts not being applied
    ... LocalIntranet_Zone code group if your code is being loaded ... could you please provide the exact caspol ... specify the public key to make sure I had the correct key. ... If I change it to be a URL condition, ...
    (microsoft.public.dotnet.security)
  • Re: CASPOL - StrongName trusts not being applied
    ... I didn't quite catch on that this is for an IE-hosted control last time I read your initial post in this thread. ... Your strong name membership code group is probably fine. ... I selected "Import" when asked to specify the public key to make sure I had the correct key. ... If I change it to be a URL condition, ...
    (microsoft.public.dotnet.security)
  • Re: CASPOL - StrongName trusts not being applied
    ... Are you adding the strong name code group under the appropriate zone code group? ... This worked fine for us, with the downside being that we are deploying this to multiple locations, so we would need to be aware of the URL for each. ... I selected "Import" when asked to specify the public key to make sure I had the correct key. ... If I change it to be a URL condition, ...
    (microsoft.public.dotnet.security)