View Single Post
  #1 (permalink)  
Old November 7th, 2010, 12:46 AM
cuddling101 cuddling101 is offline
Authorized User
Points: 150, Level: 2
Points: 150, Level: 2 Points: 150, Level: 2 Points: 150, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2009
Location: Perth, Western Australia
Posts: 33
Thanks: 7
Thanked 1 Time in 1 Post
Send a message via MSN to cuddling101 Send a message via Yahoo to cuddling101
Question Connection String error - maybe LINQ related

Greetings all

I hope I am posting correctly. I am not sure whether I should be here or in a specific book. As Imar has suggested that, if I feel that I am at all off a specific book related question, it is better to choose here; that is what I have done.

I have successfully displayed data using the basic SQL access but I am now trying to move on to the LINQ stuff.

I believe I followed all the instructions carefully, particularly page 481 onwards of Beginning ASP.NET 4 by Imar BUT I now get the following Output error message -

Code:
Could not parse the configuration file. The error message is: 'The 'provider connectionstring' keyword is not supported.'. Try editing the file manually and then saving it.
I am not too sure where I should be editing, web.config? I am also not too sure what bit is wrong, the message 'seems' to be quite vague, to me.

I have pasted my web.config below, just in case anybody can immediately see an error.

Any ideas, please.

With thanks in anticipation

Philip

Text of web.config

Code:
<?xml version="1.0" encoding="utf-8"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <connectionStrings>
    <clear />
    <add name="How_and_Why_Wonder_BooksConnectionString1" connectionString="Data Source=.\MSSQLSERVER\;Initial Catalog=How_and_Why_Wonder_Books; Integrated Security=True; Connect Timeout = 30;" providerName="System.Data.SqlClient" />
    <add name="How_and_Why_Wonder_BooksEntities" connectionString="metadata=res://*/App_Code.How_and_Why_Wonder_Books.csdl|res://*/App_Code.How_and_Why_Wonder_Books.ssdl:res://*/App_Code.How_and_Why_Wonder_Books.msl;provider=System.Data.SqlClient;provider connectionstring=&quot;Data Source=.\MSSQLSERVER;Initial Catalog=How_and_Why_Wonder_Books;Trusted_Connection=True;MultipleActiveResultsSets=True&quot;" providerName="System.Data.EntityClient" />
    <add name="LocalSqlServer" connectionString="Data Source=.\MSSQLSERVER;Initial Catalog=aspnetdb;Trusted_Connection=True" providerName="System.Data.SqlClient" />
    <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
    <add name="How_and_Why_Wonder_BooksConnectionString2" connectionString="Data Source=.;Initial Catalog=How_and_Why_Wonder_Books;Integrated Security=True" providerName="System.Data.SqlClient" />
  </connectionStrings>
  <system.web>
    <compilation debug="false" strict="false" explicit="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
      </assemblies>
      <buildProviders>
        <add extension=".edmx" type="System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider" />
      </buildProviders>
    </compilation>
    <authentication mode="Forms">
      <forms loginUrl="~/Account/Login.aspx" timeout="2880" />
    </authentication>
    <membership>
      <providers>
        <clear />
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
      </providers>
    </membership>
    <profile>
      <providers>
        <clear />
        <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" />
      </providers>
    </profile>
    <roleManager enabled="false">
      <providers>
        <clear />
        <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
        <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
      </providers>
    </roleManager>
  </system.web>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
  </system.webServer>
</configuration>
Reply With Quote