• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2307
  • Last Modified:

Postgres SQL and .NET Membership Provider for ASP.NET

I have looked high and low and seem to be getting some conflicting information.  I need to write an ASP.NET website and want to use the Membership framework that is build in along with Postgress as the backend. I started to look to write my own Membership, Role, Session providers, but then saw that the Npgsql supposedly already has this built into it.  Now I cannot find any documentation as to how to setup either the database or the web.config to use it.

So two part question:

1.  Does Npgsql for the .NET Framework support the Membership Providers already (i.e - is the functionality already provided within the library)
2.  If the answer is Yes to 1, an example of a web.config making uses of these providers?

I do see another project that seems to already be written to handle this, but it has not been updated for over a year and from the changelog on Ngpsql it seems to be implemented, but I have not found the magic documentation to confirm this for certain and show how to implement the providers in the web.config.

Assistance appreciated.  Thank You!
0
bas2754
Asked:
bas2754
  • 5
  • 3
1 Solution
 
lcohanDatabase AnalystCommented:
1. "2008-07-28 Added Daniel Nauck's ASP.Net Membership, Role, Profile and Session-State Store Provider Project to our list of projects which use Npgsql. Thanks, Daniel, for your work, help and support!"
http://npgsql.projects.postgresql.org/

2. http://www.mono-project.com/Guide:_Porting_ASP.NET_Applications


0
 
bas2754Author Commented:
Confused.  Do I need to D/L the Nauck Library seperately or is it included.  In a further update to the revision history I see this:
-------------
Main features are:
Support for .Net 2.0 and 3.5
Entity Framework (EF): Josh Cooley did a great job and added support for EntityFramework. In order to use it, you have to download a special build with the 3.5 suffix in its name on our download page.
Improved performance for large resultsets:Different from Npgsql1, Npgsql2 doesn't read all table contents before returning control to user code. This makes Npgsql much more memory efficient when dealing with large tables. Thanks Jon Hanna for this.
 Check User Manual for more info about that and how to revert to old behavior of loading all data if you need it.
ASP.Net Providers: Thanks to Daniel Nauck, Npgsql now have support for ASP.Net providers. You can visit Daniel project page at: http://dev.nauck-it.de/projects/show/aspsqlprovider/
-----------

Yet I see no further development on the Nauck Library listed.  As to second post.  while somewhat helpful, I am not porting to Linux / Mono - I still want to use ASP.NET and .NET - actually the site is going to use .NET 4 (per requirements).  So is the Nuack library seperate or included?  Where do I download the library - I cannot seem to find a Windows Native branch of this which I guess means I have to pull down the Mono and build under that?  

I appreciate the post, but really was hoping for more detail than provided.  
0
 
bas2754Author Commented:
I double checked those links and had already looked through them.  Unfortunately, the reason I am asking the question is because neither quite provide a definitive answer.  I am more than happy to award the points with a Grade of A to anyone who can for certain verify #1 and provide and example (in this thread) of how to use it if indeed the answer to 1 is Yes.  
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
lcohanDatabase AnalystCommented:
All I can say is that we are currently using NPGSQL 2.0 with .Net 3.5, ADO 2.0 and applied recommendations from http://www.mono-project.com/Guide:_Porting_ASP.NET_Applications to make it work. Now I guess this is no proof indeed and for obvious reasons I can't post our web.config file content here but it has what the above link recomends.

Also maybe below can help:
http://npgsql.com/index.php/2009/08/how-to-set-up-entity-framework-npgsql-part-1/

"Update Machine.Config

So that .NET and the Visual Studio environment will recognize Npgsql as an installed database provider, you need to edit machine.config.   Most likely, your machine.config file is located in
‘C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config’

Add the following entry to the section entitled ‘DbProviderFactories’:

<add name=”Npgsql Data Provider”invariant=”Npgsql”support=”FF”description=”.Net Framework Data Provider for Postgresql Server”type=”Npgsql.NpgsqlFactory, Npgsql, Version=1.98.2.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7¿ /></DbProviderFactories><add name=”Npgsql Data Provider”
invariant=”Npgsql”  support=”FF”
description=”.Net Framework Data Provider for Postgresql Server”
type=”Npgsql.NpgsqlFactory, Npgsql, Version=2.0.6.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7¿ />

Note that you may need to update ‘Version’ to reflect the latest or your installed version of Npgsql.  With this config file update, you can reference Npgsql as a data provider in .NET applications.
"
0
 
bas2754Author Commented:
I will give it a shot tonight.
0
 
bas2754Author Commented:
Are you running your application on Mono under Linux or are you running it on Windows IIS?
0
 
lcohanDatabase AnalystCommented:
We are running the app under IIS 7.0 and the PG version 8.3.5 db's are on Linux 4.1.2
0
 
bas2754Author Commented:
Although it is not all of what I needed, it got to where it needed to be.   Still haven't gotten it to fully work, but since I know it does I am accepting the solution.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now