Since I want to use Postgresql and NHibernate in my ASP.NET MVC4 project, I am wondering if it is possible to use the WebMatrix.WebData.WebSecurity for security and authentication features? NHibernate and Postgres are working already together, but when I want to set up the WebSecurity class with:
WebSecurity.InitializeDatabaseConnection("DefaultConnection", "UserProfile", "Id", "UserName", autoCreateTables: true);
I get the following error message:
Unable to find the requested .Net Framework Data Provider. It may not be installed.
Creating a DbProviderFactory doesn't also work:
<system.data>
<DbProviderFactories>
<add name="Npgsql - .Net Data Provider for PostgreSQL" invariant="Npgsql"
description=".Net Data Provider for PostgreSQL" type="Npgsql.NpgsqlFactory" />
</DbProviderFactories>
</system.data>
Is it in principle possible to use the WebSecurity class without using EntityFramework? Or do you have any suggestion to solve the problem?