Web.config issue In memberShip Provider

Web.config issue In memberShip Provider

Postby chlebta » Wed 16 Apr 2014 23:07

I'm trying to use The devart SimpleMembership and SimpleRole Providers for Oracle in ASP.NET MVC I folowed this Tutorial but in step 7 when I lunch my app I got this error :

Code: Select all
Erreur HTTP 500.19 - Internal Server Error
    Unable to access the page you requested because the related configuration data for the page is invalid.
Error description : Unable to read configuration section 'membership' because a declaration section is missing

at this line (he's colored with red):
Code: Select all
<membership defaultProvider="MySqlExtendedMembershipProvider">

and this is part of my web.config file :
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <membership defaultProvider="MySqlExtendedMembershipProvider">
    <providers>
      <remove name="OracleExtendedMembershipProvider"/>
      <add name="OracleExtendedMembershipProvider" type="Devart.Data.Oracle.Web.Providers.OracleExtendedMembershipProvider,
        Devart.Data.Oracle.Web, Version=8.3.135.4, Culture=neutral, PublicKeyToken=09af7300eec23701"
        description="dotConnect for Oracle extended membership provider" connectionStringName="DefaultConnection" />
    </providers>
  </membership>
  <roleManager enabled="true" defaultProvider="OracleExtendedRoleProvider">
    <providers>
      <remove name="OracleExtendedRoleProvider"/>
      <add name="OracleExtendedRoleProvider" type="Devart.Data.Oracle.Web.Providers.OracleExtendedRoleProvider,
          Devart.Data.Oracle.Web, Version=8.3.135.4, Culture=neutral, PublicKeyToken=09af7300eec23701"
          description="dotConnect for Oracle extended role provider" connectionStringName="DefaultConnection" />
    </providers>
  </roleManager>
  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <connectionStrings>
    <add name="DefaultConnection" connectionString="User Id=devart;Password=1234;Data Source=localhost:1521" providerName="Devart.Data.Oracle" />
  </connectionStrings>
  <appSettings>
    <add key="webpages:Version" value="2.0.0.0" />
    <add key="webpages:Enabled" value="false" />
    <add key="PreserveLoginUrl" value="true" />
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
  </appSettings>

So What's wrong here?
chlebta
 
Posts: 4
Joined: Wed 16 Apr 2014 22:48

Re: Web.config issue In memberShip Provider

Postby Pinturiccio » Fri 18 Apr 2014 09:00

There is a misprint in our tutorial, we'll fix it.
The same information but without misprint is present in our documentation http://www.devart.com/dotconnect/oracle/docs/?ExtendedMembership-Tutorial.html

For fixing the issue please replace:
Code: Select all
<membership defaultProvider="MySqlExtendedMembershipProvider">

with:
Code: Select all
<membership defaultProvider="OracleExtendedMembershipProvider">
Pinturiccio
Devart Team
 
Posts: 1954
Joined: Wed 02 Nov 2011 09:44

Re: Web.config issue In memberShip Provider

Postby chlebta » Fri 18 Apr 2014 14:36

I have changed this Already always same problem <membership defaultProvider="OracleExtendedMembershipProvider"/> is colored with red and same error
chlebta
 
Posts: 4
Joined: Wed 16 Apr 2014 22:48

Re: Web.config issue In memberShip Provider

Postby chlebta » Sun 20 Apr 2014 17:31

To slove this problem I had to move the membership element (and children) as well as the roleManager element inside of the system.web element.
chlebta
 
Posts: 4
Joined: Wed 16 Apr 2014 22:48


Return to dotConnect for Oracle