Page 1 of 1

Transaction Aborted Error

Posted: Sun 28 Dec 2008 22:05
by mrlami
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!

Posted: Sun 28 Dec 2008 22:58
by mrlami
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).

Posted: Tue 30 Dec 2008 15:19
by Shalex
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.

Posted: Sat 28 Mar 2009 02:34
by mrlami
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)

Posted: Mon 30 Mar 2009 11:33
by Shalex
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?