0

I have a two custom role providers. One of them is set as the default role provider in the root web.config

<roleManager enabled="true" defaultProvider="COS" cacheRolesInCookie="true" cookieName=".ASPROLES" cookieTimeout="10"
             cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true" cookieProtection="All" >
  <providers>
    <add name="COS" type="ServiceEventDirectory.COSRoleProvider"/>
    <add name="PINS" type="ServiceEventDirectory.PINSRoleProvider"/>
  </providers>
</roleManager>

What I need is to be able to utilize the other role provider within a sub section of my web application. How if possible can I configure it so that when roles are determined within this sub section of the application will it use the 'PINS' role provider?

My initial reaction was to override the role manager element in a web.config within the sub section's directory. This gives the compilation error:

It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Brett
  • 1,140
  • 10
  • 16
  • 1
    Have you tried the solution in http://stackoverflow.com/questions/2355947/error-allowdefinition-machinetoapplication-beyond-application-level ? – Tobias Nilsson Jan 08 '13 at 14:45
  • Unfortunately, I have tried cleaning and rebuilding the solution as appropriate. This didn't make any difference. – Brett Jan 08 '13 at 15:30

0 Answers0