title: Subsonic 2.2 ASP.NET MVC Unrecognized configuration section
body: <p>I'm using Subsonic 2.2 Subcommander(Sonic.exe) to generate my DAL in a standalone class library with its own app.config.</p>
  <p>I'm then referencing this dll assembly in my ASP.NET MVC webapp, and it compiles fine. When I try hitting a page I get &quot;unrecognized configuration section&quot;</p>
  <p>Here's a screenshot of the error:
  <a href="https://i.stack.imgur.com/NloxQ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NloxQ.jpg" alt="" /></a>
  <a href="http://i41.tinypic.com/2h5l0zk.jpg" rel="nofollow noreferrer">http://i41.tinypic.com/2h5l0zk.jpg</a></p>
  <p>Any clues/help much appreciated!</p>
  <p>Here is my web.config:</p>
  <pre>
  &lt;?xml version=&quot;1.0&quot;?&gt;
  &lt;configuration&gt;
      &lt;configSections&gt;
          &lt;sectionGroup name=&quot;system.web.extensions&quot; type=&quot;System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;&gt;
              &lt;sectionGroup name=&quot;scripting&quot; type=&quot;System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;&gt;
                  &lt;section name=&quot;scriptResourceHandler&quot; type=&quot;System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot; requirePermission=&quot;false&quot; allowDefinition=&quot;MachineToApplication&quot;/&gt;
                  &lt;sectionGroup name=&quot;webServices&quot; type=&quot;System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;&gt;
                      &lt;section name=&quot;jsonSerialization&quot; type=&quot;System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot; requirePermission=&quot;false&quot; allowDefinition=&quot;Everywhere&quot;/&gt;
                      &lt;section name=&quot;profileService&quot; type=&quot;System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot; requirePermission=&quot;false&quot; allowDefinition=&quot;MachineToApplication&quot;/&gt;
                      &lt;section name=&quot;authenticationService&quot; type=&quot;System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot; requirePermission=&quot;false&quot; allowDefinition=&quot;MachineToApplication&quot;/&gt;
                      &lt;section name=&quot;roleService&quot; type=&quot;System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot; requirePermission=&quot;false&quot; allowDefinition=&quot;MachineToApplication&quot;/&gt;
                      &lt;section name=&quot;SubSonicService&quot; type=&quot;SubSonic.SubSonicSection, SubSonic&quot; requirePermission=&quot;false&quot; /&gt;
                  &lt;/sectionGroup&gt;
              &lt;/sectionGroup&gt;
          &lt;/sectionGroup&gt;
      &lt;/configSections&gt;
      &lt;appSettings/&gt;
      &lt;connectionStrings&gt;
          &lt;add name=&quot;ApplicationServices&quot; connectionString=&quot;data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true&quot; providerName=&quot;System.Data.SqlClient&quot;/&gt;
          &lt;add name=&quot;pws&quot; connectionString=&quot;server=.\DEV1_DBS2;Integrated Security=true;database=pws;&quot; providerName=&quot;&quot; /&gt;
      &lt;/connectionStrings&gt;
      &lt;system.web&gt;
          &lt;compilation debug=&quot;true&quot;&gt;
              &lt;assemblies&gt;
                  &lt;add assembly=&quot;System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089&quot;/&gt;
                  &lt;add assembly=&quot;System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt;
                  &lt;add assembly=&quot;System.Web.Abstractions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt;
                  &lt;add assembly=&quot;System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt;
                  &lt;add assembly=&quot;System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt;
                  &lt;add assembly=&quot;System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089&quot;/&gt;
                  &lt;add assembly=&quot;System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089&quot;/&gt;
                  &lt;add assembly=&quot;System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089&quot;/&gt;
              &lt;/assemblies&gt;
          &lt;/compilation&gt;
          &lt;authentication mode=&quot;Forms&quot;&gt;
              &lt;forms loginUrl=&quot;~/Account/LogOn&quot; timeout=&quot;2880&quot;/&gt;
          &lt;/authentication&gt;
          &lt;membership&gt;
              &lt;providers&gt;
                  &lt;clear/&gt;
                  &lt;add name=&quot;AspNetSqlMembershipProvider&quot; type=&quot;System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&quot; connectionStringName=&quot;ApplicationServices&quot; enablePasswordRetrieval=&quot;false&quot; enablePasswordReset=&quot;true&quot; requiresQuestionAndAnswer=&quot;false&quot; requiresUniqueEmail=&quot;false&quot; passwordFormat=&quot;Hashed&quot; maxInvalidPasswordAttempts=&quot;5&quot; minRequiredPasswordLength=&quot;6&quot; minRequiredNonalphanumericCharacters=&quot;0&quot; passwordAttemptWindow=&quot;10&quot; passwordStrengthRegularExpression=&quot;&quot; applicationName=&quot;/&quot;/&gt;
              &lt;/providers&gt;
          &lt;/membership&gt;
          &lt;profile&gt;
              &lt;providers&gt;
                  &lt;clear/&gt;
                  &lt;add name=&quot;AspNetSqlProfileProvider&quot; type=&quot;System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&quot; connectionStringName=&quot;ApplicationServices&quot; applicationName=&quot;/&quot;/&gt;
              &lt;/providers&gt;
          &lt;/profile&gt;
          &lt;roleManager enabled=&quot;false&quot;&gt;
              &lt;providers&gt;
                  &lt;clear/&gt;
                  &lt;add connectionStringName=&quot;ApplicationServices&quot; applicationName=&quot;/&quot; name=&quot;AspNetSqlRoleProvider&quot; type=&quot;System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&quot;/&gt;
                  &lt;add applicationName=&quot;/&quot; name=&quot;AspNetWindowsTokenRoleProvider&quot; type=&quot;System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&quot;/&gt;
              &lt;/providers&gt;
          &lt;/roleManager&gt;
          &lt;!--&lt;customErrors mode=&quot;RemoteOnly&quot; defaultRedirect=&quot;GenericErrorPage.htm&quot;&gt;--&gt;
          &lt;customErrors mode=&quot;Off&quot; defaultRedirect=&quot;GenericErrorPage.htm&quot;&gt;
              &lt;error statusCode=&quot;403&quot; redirect=&quot;NoAccess.htm&quot; /&gt;
              &lt;error statusCode=&quot;404&quot; redirect=&quot;FileNotFound.htm&quot; /&gt;
          &lt;/customErrors&gt;
          &lt;pages&gt;
              &lt;controls&gt;
                  &lt;add tagPrefix=&quot;asp&quot; namespace=&quot;System.Web.UI&quot; assembly=&quot;System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt;
                  &lt;add tagPrefix=&quot;asp&quot; namespace=&quot;System.Web.UI.WebControls&quot; assembly=&quot;System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt;
              &lt;/controls&gt;
              &lt;namespaces&gt;
                  &lt;add namespace=&quot;System.Web.Mvc&quot;/&gt;
                  &lt;add namespace=&quot;System.Web.Mvc.Ajax&quot;/&gt;
                  &lt;add namespace=&quot;System.Web.Mvc.Html&quot;/&gt;
                  &lt;add namespace=&quot;System.Web.Routing&quot;/&gt;
                  &lt;add namespace=&quot;System.Linq&quot;/&gt;
                  &lt;add namespace=&quot;System.Collections.Generic&quot;/&gt;
              &lt;/namespaces&gt;
          &lt;/pages&gt;
          &lt;httpHandlers&gt;
              &lt;remove verb=&quot;*&quot; path=&quot;*.asmx&quot;/&gt;
              &lt;add verb=&quot;*&quot; path=&quot;*.asmx&quot; validate=&quot;false&quot; type=&quot;System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt;
              &lt;add verb=&quot;*&quot; path=&quot;*_AppService.axd&quot; validate=&quot;false&quot; type=&quot;System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt;
              &lt;add verb=&quot;GET,HEAD&quot; path=&quot;ScriptResource.axd&quot; type=&quot;System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot; validate=&quot;false&quot;/&gt;
              &lt;add verb=&quot;*&quot; path=&quot;*.mvc&quot; validate=&quot;false&quot; type=&quot;System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt;
          &lt;/httpHandlers&gt;
          &lt;httpModules&gt;
              &lt;add name=&quot;ScriptModule&quot; type=&quot;System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt;
              &lt;add name=&quot;UrlRoutingModule&quot; type=&quot;System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt;
          &lt;/httpModules&gt;
      &lt;/system.web&gt;
      &lt;system.codedom&gt;
          &lt;compilers&gt;
              &lt;compiler language=&quot;c#;cs;csharp&quot; extension=&quot;.cs&quot; warningLevel=&quot;4&quot; type=&quot;Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&quot;&gt;
                  &lt;providerOption name=&quot;CompilerVersion&quot; value=&quot;v3.5&quot;/&gt;
                  &lt;providerOption name=&quot;WarnAsError&quot; value=&quot;false&quot;/&gt;
              &lt;/compiler&gt;
              &lt;compiler language=&quot;vb;vbs;visualbasic;vbscript&quot; extension=&quot;.vb&quot; warningLevel=&quot;4&quot; type=&quot;Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&quot;&gt;
                  &lt;providerOption name=&quot;CompilerVersion&quot; value=&quot;v3.5&quot;/&gt;
                  &lt;providerOption name=&quot;OptionInfer&quot; value=&quot;true&quot;/&gt;
                  &lt;providerOption name=&quot;WarnAsError&quot; value=&quot;false&quot;/&gt;
              &lt;/compiler&gt;
          &lt;/compilers&gt;
      &lt;/system.codedom&gt;
      &lt;system.web.extensions/&gt;
      &lt;system.webServer&gt;
          &lt;validation validateIntegratedModeConfiguration=&quot;false&quot;/&gt;
          &lt;modules runAllManagedModulesForAllRequests=&quot;true&quot;&gt;
              &lt;remove name=&quot;ScriptModule&quot;/&gt;
              &lt;remove name=&quot;UrlRoutingModule&quot;/&gt;
              &lt;add name=&quot;ScriptModule&quot; preCondition=&quot;managedHandler&quot; type=&quot;System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt;
              &lt;add name=&quot;UrlRoutingModule&quot; type=&quot;System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt;
          &lt;/modules&gt;
          &lt;handlers&gt;
              &lt;remove name=&quot;WebServiceHandlerFactory-Integrated&quot;/&gt;
              &lt;remove name=&quot;ScriptHandlerFactory&quot;/&gt;
              &lt;remove name=&quot;ScriptHandlerFactoryAppServices&quot;/&gt;
              &lt;remove name=&quot;ScriptResource&quot;/&gt;
              &lt;remove name=&quot;MvcHttpHandler&quot;/&gt;
              &lt;remove name=&quot;UrlRoutingHandler&quot;/&gt;
              &lt;add name=&quot;ScriptHandlerFactory&quot; verb=&quot;*&quot; path=&quot;*.asmx&quot; preCondition=&quot;integratedMode&quot; type=&quot;System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt;
              &lt;add name=&quot;ScriptHandlerFactoryAppServices&quot; verb=&quot;*&quot; path=&quot;*_AppService.axd&quot; preCondition=&quot;integratedMode&quot; type=&quot;System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt;
              &lt;add name=&quot;ScriptResource&quot; preCondition=&quot;integratedMode&quot; verb=&quot;GET,HEAD&quot; path=&quot;ScriptResource.axd&quot; type=&quot;System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt;
              &lt;add name=&quot;MvcHttpHandler&quot; preCondition=&quot;integratedMode&quot; verb=&quot;*&quot; path=&quot;*.mvc&quot; type=&quot;System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot;/&gt;
              &lt;add name=&quot;UrlRoutingHandler&quot; preCondition=&quot;integratedMode&quot; verb=&quot;*&quot; path=&quot;UrlRouting.axd&quot; type=&quot;System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&quot;/&gt;
          &lt;/handlers&gt;
      &lt;/system.webServer&gt;
      &lt;SubSonicService defaultProvider=&quot;pws&quot;&gt;
          &lt;providers&gt;
              &lt;clear /&gt;
              &lt;add name=&quot;pws&quot; type=&quot;SubSonic.SqlDataProvider, SubSonic&quot; connectionStringName=&quot;pws&quot; generatedNamespace=&quot;pws.Database&quot; /&gt;
          &lt;/providers&gt;
      &lt;/SubSonicService&gt;
  &lt;/configuration&gt;
  </pre>
  <p>cheers</p>