0

I am trying to implement Simple membership in my ASP.NET MVC 4 application targeting .NET Framework 4.0. I have referred many articles, but all showing it targeted for .NET Framework 4.5. Finally, I selected following article to implement this in my MVC application Decoupling Simplemembership from MVC application The only difference is that -

  1. I have .NET Framework 4.0 rather than 4.5
  2. I am consuming the SimpleMembership from WCF service rather than MVC.

I am getting following error: Could not load file or assembly 'Custom_SimpleMembership' or one of its dependencies. The system cannot find the file specified.

Following is what I have in WCF's config

<context type="SimpleSecurity.Repositories.SecurityContext,
Custom_SimpleMembership" disableDatabaseInitialization="false">
<databaseInitializer
type="SimpleSecurity.DropCreateSecurityDb, Custom_SimpleMembership" />
</context>

The assembly where I have implemented simplemembership is named as "Custom_SimpleMembership", and I have referenced it in my WCF project. Also the namespaces are correct (i.e. SimpleSecurity)

Nirman
  • 6,715
  • 19
  • 72
  • 139
  • Is there an assembly in the bin directory named Custom_SimpleMembership.dll? I would not put your memembership provider in a web service for performance and security reasons. Are you are doing it just because of the .NET 4.0 constraints? – Kevin Junghans May 21 '13 at 17:26
  • I have placed membership provider in a web service because I do not want my MVC application to directly access database. – Nirman May 22 '13 at 04:46
  • You forgot to answer my first question about whether you can see the assembly in the bin directory for your web service. I do not know all of your project requirements but look at this QA [http://stackoverflow.com/questions/204653/when-should-a-web-service-not-be-used]. Web services are not always the answer. – Kevin Junghans May 22 '13 at 13:15

0 Answers0