Click here to Skip to main content
15,886,710 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hii ,

Below is my web.config file section

XML
<connectionStrings>
    <add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-AutoSpareParts-20141021232459;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-AutoSpareParts-20141021232459.mdf" />
    <add name="AutoSparePartsConnection" providerName="System.Data.SqlClient" connectionString="Data Source=TORAKAMI\TORAKAMI;Initial Catalog=AutoSpareParts;Integrated Security=True" />
  </connectionStrings>



<membership defaultprovider="HDIMembershipProvider" userisonlinetimewindow="15">

<providers>
<clear>
<add>
name="HDIMembershipProvider"
type="HDI.AspNet.Membership.HDIMembershipProvider"
connectionStringName="AutoSparePartsConnection"
enablePasswordRetrieval="true"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
writeExceptionsToEventLog="false" />



But i am getting Below eror

Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load type 'HDI.AspNet.Membership.HDIMembershipProvider'.

Source Error:


Line 38: <add>
Line 39: name="HDIMembershipProvider"
Line 40: type="HDI.AspNet.Membership.HDIMembershipProvider"
Line 41: connectionStringName="AutoSparePartsConnection"
Line 42: enablePasswordRetrieval="true"
Posted

1 solution

It is not able to find your provider ...
C#
HDI.AspNet.Membership.HDIMembershipProvider


this is how you should write.

If your provider class file is in App_code folder :
C#
type="HDI.AspNet.Membership.HDIMembershipProvider"


Else if in seperate dll then:
C#
type="Namespace.classname, assembly".

assembly ~ your dll name.

also you add a reference to your dll
 
Share this answer
 
Comments
Torakami 23-Nov-14 4:22am    
Thanks man .. this solved my problem ..but now getting error in my outh when i try to login using google account:-

Could not load file or assembly 'EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
Deepu S Nair 23-Nov-14 4:35am    
Hi Torakami,

First and foremost you can go is re-add entity framework Tools-library Package Manager->Package Manager Console

Install-Package EntityFramework
If you want to be 'clean' you can try an uninstall first. There's no harm in this even if it fails.

Uninstall-Package EntityFramework
or else try the solution from the thread below:

http://stackoverflow.com/questions/11749175/could-not-load-file-or-assembly-entityframework-after-downgrading-ef-5-0-0-0

http://www.codeproject.com/Questions/449757/Entity-Framework-version-error-in-config-file
Torakami 23-Nov-14 5:18am    
dude i tried this .. i downgrade to 4.3.1 but still getting same error ..

<assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentassembly>
<assemblyidentity name="DotNetOpenAuth.Core" publickeytoken="2780ccd10d57b246">
<bindingredirect oldversion="1.0.0.0-4.0.0.0" newversion="4.1.0.0">

<dependentassembly>
<assemblyidentity name="DotNetOpenAuth.AspNet" publickeytoken="2780ccd10d57b246">
<bindingredirect oldversion="0.0.0.0-4.1.0.0" newversion="4.1.0.0">

<dependentassembly>
<assemblyidentity name="EntityFramework" publickeytoken="b77a5c561934e089" culture="neutral">
<bindingredirect oldversion="0.0.0.0-4.3.1.0" newversion="4.3.1.0">

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900