[Solved] ASP.Net Error: Keyword not supported: provider

makumbi
 
on Jul 23, 2022 08:28 AM
542 Views

I am using SqlServer 2000 but getting this error when i run this ASP.Net web page.

Keyword not supported: 'provider'.

<?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>
  <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=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
      requirePermission="false"/>
  </configSections>
  <connectionStrings>
    <add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\aspnet-UPLOADPHOTOS-20220723084802.mdf;Initial Catalog=aspnet-UPLOADPHOTOS-20220723084802;Integrated Security=True"
      providerName="System.Data.SqlClient" />
    <add name="SMIS2022ConnectionString" connectionString="Provider=SQLOLEDB;Data Source=KCC\SQLSERVER2000;User ID=makumbi;Initial Catalog=BUNAMWAYA"
      providerName="System.Data.OleDb" />
  </connectionStrings>
  <system.web>
    <authentication mode="None"/>
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.5.2"/>
    <httpRuntime targetFramework="4.5.2"/>
    <pages>
      <namespaces>
        <add namespace="System.Web.Optimization"/>
      </namespaces>
      <controls>
        <add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt"/>
      </controls>
    </pages>
    <membership>
      <providers>
        <!--
	      ASP.NET Membership is disabled in this template. Please visit the following link http://go.microsoft.com/fwlink/?LinkId=301889 to learn about the ASP.NET Membership support in this template
        -->
        <clear/>
      </providers>
    </membership>
    <profile>
      <providers>
        <!--
	      ASP.NET Membership Profile is disabled in this template. Please visit the following link http://go.microsoft.com/fwlink/?LinkId=301889 to learn about the ASP.NET Membership support in this template
        -->
        <clear/>
      </providers>
    </profile>
    <roleManager>
      <!--
	        ASP.NET Membership Role is disabled in this template. Please visit the following link http://go.microsoft.com/fwlink/?LinkId=301889 to learn about the ASP.NET Membership support in this template
        -->
      <providers>
        <clear/>
      </providers>
    </roleManager>
    <!--
            If you are deploying to a cloud environment that has multiple web server instances,
            you should change session state mode from "InProc" to "Custom". In addition,
            change the connection string named "DefaultConnection" to connect to an instance
            of SQL Server (including SQL Azure and SQL  Compact) instead of to SQL Server Express.
      -->
    <sessionState mode="InProc" customProvider="DefaultSessionProvider">
      <providers>
        <add name="DefaultSessionProvider"
          type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
          connectionStringName="DefaultConnection"/>
      </providers>
    </sessionState>
  </system.web>
  <system.webServer>
    <modules>
      <remove name="FormsAuthentication"/>
    </modules>
  </system.webServer>
</configuration>
Download FREE API for Word, Excel and PDF in ASP.Net: Download
dharmendr
 
on Jul 23, 2022 08:27 AM
makumbi says:
    <add name="SMIS2022ConnectionString" connectionString="Provider=SQLOLEDB;Data Source=KCC\SQLSERVER2000;User ID=makumbi;Initial Catalog=BUNAMWAYA"
      providerName="System.Data.OleDb" />

Remove Provider=SQLOLEDB; and add password.

connectionString="Data Source=KCC\SQLSERVER2000;User ID=makumbi;password=xxxx;Initial Catalog=BUNAMWAYA"