Default role provider not found in iis 6 and asp.net mvc 3

I am running asp.net mvc 3 apllication on ii6. Membership or role providers are not used. I logged in by manually creating an authorization cookie and processing it in global.asax. First of all, this error:

Access is denied when creating the App_Data subdirectory Description: For security reasons, the identifier "IIS APPPOOL \ ASP.NET v4.0" (under which this web application runs) does not have permission to create the App_Data subdirectory in the application root directory. ASP.NET stores the Microsoft SQL Express database file used for services such as membership and profile in the App_Data subdirectory of your application.

I searched for this error and add it to my web.config file as a solution: in <system.web> node: <roleManager enabled="false"> <providers> <clear /> </providers> </roleManager>

and in the <modules> node in <system.webServer> : <remove name="RoleManager" />

and then received the message, "The default role provider was not found."

What have I done wrong?

+1
source share
1 answer

solved. IIS6 does not recognize <system.webServer> (it was introduced in IIS7), and instead I used <httpModules> in <system.web> :

 <system.web> ... <httpModules> <remove name="RoleManager" /> </httpModules> ... <system.web> 
+2
source

Source: https://habr.com/ru/post/1209429/


All Articles