Is it possible for a medium trust web application to read the Membership
providers? The following throws a SecurityExcepti on:
MembershipSecti on membershipSecti on =
(MembershipSect ion)WebConfigur ationManager.Ge tSection("syste m.web/membership");
I have custom sections in my web.config where I specify
requirePermissi on="false", which allows them to be read in medium trust, but
it does not seem possible to do this for the membership section. When I
attempt it, like putting the following at the top of web.config...
<section name="membershi p" type="System.We b.Configuration .MembershipSect ion,
System.Web" allowDefinition ="MachineToAppl ication" requirePermissi on="false"
/>
....I get the error "There is a duplicate 'system.web/membership' section
defined". I understand it may be possible to get around this by editing the
machine-level web.config so that allowOverride=" true", but this is not an
option in my case, as I am developing a web application for wide
distribution, and I do not want to require my users to edit the machine-level
web.config.
Thanks,
Roger Martin
Gallery Server Pro (http://www.galleryserverpro.com)
providers? The following throws a SecurityExcepti on:
MembershipSecti on membershipSecti on =
(MembershipSect ion)WebConfigur ationManager.Ge tSection("syste m.web/membership");
I have custom sections in my web.config where I specify
requirePermissi on="false", which allows them to be read in medium trust, but
it does not seem possible to do this for the membership section. When I
attempt it, like putting the following at the top of web.config...
<section name="membershi p" type="System.We b.Configuration .MembershipSect ion,
System.Web" allowDefinition ="MachineToAppl ication" requirePermissi on="false"
/>
....I get the error "There is a duplicate 'system.web/membership' section
defined". I understand it may be possible to get around this by editing the
machine-level web.config so that allowOverride=" true", but this is not an
option in my case, as I am developing a web application for wide
distribution, and I do not want to require my users to edit the machine-level
web.config.
Thanks,
Roger Martin
Gallery Server Pro (http://www.galleryserverpro.com)
Comment