Transaction Aborted Error

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
mrlami
Posts: 13
Joined: Sat 27 Dec 2008 23:50

Transaction Aborted Error

Post by mrlami » Sun 28 Dec 2008 22:05

I get this error when I try to delete a user using the Membership.DeleteUser("xxx");

Code: Select all

Server Error in '/' Application.
current transaction is aborted, commands ignored until end of transaction block 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: Devart.Data.PostgreSql.PgSqlException: current transaction is aborted, commands ignored until end of transaction block

Source Error: 

Line 23:         {
Line 24:             //Membership.CreateUser("g", "lami123");
Line 25:             Membership.DeleteUser("g");
Line 26: 
Line 27: 

Stack Trace:

[PgSqlException (0x80004005): current transaction is aborted, commands ignored until end of transaction block]
   Devart.Common.Web.Providers.DbMembershipProvider.DeleteUser(String username, Boolean deleteAllRelatedData) +144

[ProviderException: An exception occurred. Please contact your administrator.]
   Devart.Common.Web.Providers.DbMembershipProvider.DeleteUser(String username, Boolean deleteAllRelatedData) +215
   System.Web.Security.Membership.DeleteUser(String username) +75

Someone please help. Thanks!

mrlami
Posts: 13
Joined: Sat 27 Dec 2008 23:50

Post by mrlami » Sun 28 Dec 2008 22:58

Found Solution:

The profiles table (aspnet_profiles) seems to have to be present in the database for Membership.DeleteUser() to work.

I'm not sure if to call this a bug or not, but I see no reason why the DeleteUser method should not work unless the aspnet_profiles table is present (especially when one is not using it)


Advice: Devart should release some of it's source code (@ least the Membership Provider portion) to it's customers and maybe even a select group of the public that will help facilitate adding features/fixing bugs (:wink: let's see how far i'll get with pushing this one).

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Tue 30 Dec 2008 15:19

We recommend you to install all the tables of the PostgreSQL scheme we provide for the ASP.NET membership.
By default, you can find the script here: C:\Program Files\Devart\dotConnect\PostgreSQL\InstallWebTables.sql.

Microsoft's System.Web.Security.SqlMembershipProvider doesn't work without the aspnet_Profile table too.

mrlami
Posts: 13
Joined: Sat 27 Dec 2008 23:50

Post by mrlami » Sat 28 Mar 2009 02:34

BS is BS even if it's Microsofts way.

There is no reason why a table should be created if its not been used (just my opinion, you guys still rock)

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 30 Mar 2009 11:33

I cannot reproduce the problem with the 4.50.24 version of dotConnect for PostgreSQL. I created all tables from our scheme, removed the aspnet_profiles table, added and deleted the user using Membership provider (this is the only provider from dotConnect for PostgreSQL ASP.NET Provider Model Support that is registered in the web.config file of my test web site). It works without any errors.

Why is the aspnet_profiles table so critical for your task?

Post Reply