Problem with AspSQLProvider (Bug #12)
Description
I have installer Npgsql ans AspSQLProvider.
I am able to read and write the PostgreSQL database, but when I try to create an user or a group with the ASP.NET Web Administration Tool I get the following error:
Operation aborted due to an exception (see Trace for details). em System.Web.Administration.WebAdminPage.CallWebAdminHelperMethod(Boolean isMembership, String methodName, Object[] parameters, Type[] paramTypes) em ASP.security_users_adduser_aspx.PopulateCheckboxes() na c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles\Security\Users\addUser.aspx:linha 28 em ASP.security_users_adduser_aspx.Page_Load() na c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles\Security\Users\addUser.aspx:linha 22 em System.Web.Util.CalliHelper.ArglessFunctionCaller(IntPtr fp, Object o) em System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, [[EventArgs]] e) em System.Web.UI.Control.OnLoad(EventArgs e) em System.Web.UI.Control.LoadRecursive() em System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
At the first screen the ASP.NET Web Administration Tool reports that there are "0" users, so I guess it is able to read the database.
Below you find excerpts of the Web.config configuration file:
<connectionStrings>
<remove name="AspSQLProvider"/>
<add name="AspSQLProvider" connectionString="Server=localhost;Port=5432;Database=exemplosecurity;User Id=postgres;Password=postgres;Encoding=UNICODE;Sslmode=Prefer;Pooling=true;"/>
</connectionStrings>
...
<membership defaultProvider="PgMembershipProvider">
<providers>
<add name="PgMembershipProvider" type="NauckIT.PostgreSQLProvider.PgMembershipProvider"
connectionStringName="AspSQLProvider"
enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Clear" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" />
</providers>
</membership>
<roleManager enabled="true" defaultProvider="PgRoleProvider"
cacheRolesInCookie="true" cookieName=".AspNetRoles" cookiePath="/" cookieProtection="All" cookieRequireSSL="false" cookieSlidingExpiration="true" createPersistentCookie="false" cookieTimeout="30" maxCachedResults="25">
<providers>
<add name="PgRoleProvider" type="NauckIT.PostgreSQLProvider.PgRoleProvider"
connectionStringName="AspSQLProvider" />
</providers>
</roleManager>
Thanks
History
Updated by Daniel Nauck about 3 years ago
Hello,
the real exception is only logged to the trace for security reasons, so can you please anable tracing as described here: Debugging
Updated by Daniel Nauck over 2 years ago
Closed due missing feedback from the reporter.
Just reopen this ticket if you have the required debugging and trace information, thanks.
- Start date set to 01/20/2010
- Due date set to 01/20/2010
- Target version changed from 3.0 to 2.0
- Priority changed from Urgent to Normal
Updated by Daniel Nauck over 2 years ago
- Status changed from New to Closed
Updated by Danyel Leon about 2 years ago
Hi Daniel.
First, thanks for this great provider.
I have a problem similar to issue #12 but whith a different error mensaje. I write here the full trace of the Web Site Administration Tool in the Security tab, and my Web.config file too.
I apreciate if this situation have a good end !!
Thanks in advance.
Trace Info: >>>>>>>>>>>>>>>>
Request Details
Session Id: azc0ncifnikv0febedvfpx45 Request Type: GET
Time of Request: 3/11/2010 1:27:03 AM Status Code: 200
Request Encoding: Unicode (UTF-8) Response Encoding: Unicode (UTF-8)
Trace Information
Category Message From First(s) From Last(s)
aspx.page Begin PreInit
aspx.page End PreInit 0.0362498585714106 0.036250
aspx.page Begin Init 0.0371421507482096 0.000892
aspx.page End Init 0.0499571872961508 0.012815
aspx.page Begin InitComplete 0.0501141904906909 0.000157
aspx.page End InitComplete 0.050307790515275 0.000194
aspx.page Begin PreLoad 0.0503645016335875 0.000057
aspx.page End PreLoad 0.0504198159263258 0.000055
aspx.page Begin Load 0.0504723365679158 0.000053
aspx.page End Load 0.0539325528803242 0.003460
aspx.page Begin LoadComplete 0.0540856449632565 0.000153
aspx.page End LoadComplete 0.0541417973513393 0.000056
aspx.page Begin PreRender 0.0541945973580441 0.000053
aspx.page End PreRender 0.0542624830809502 0.000068
aspx.page Begin PreRenderComplete 0.0543166799132292 0.000054
aspx.page End PreRenderComplete 0.0544345719916917 0.000118
aspx.page Begin SaveState 0.0569773532669655 0.002543
aspx.page End SaveState 0.0579677025990733 0.000990
aspx.page Begin SaveStateComplete 0.0580439692754247 0.000076
aspx.page End SaveStateComplete 0.0580998422983927 0.000056
aspx.page Begin Render 0.0581532010353271 0.000053
aspx.page End Render 0.0599092901472114 0.001756
Control Tree
Control UniqueID Type Render Size Bytes (including children) ViewState Size Bytes (excluding children) ControlState Size Bytes (excluding children)
__Page ASP.security_security0_aspx 14133 0 0
ctl00 ASP.WebAdminButtonRowMasterPage 14133 0 0
ctl00$ctl00 ASP.WebAdminMasterPage 14133 0 0
ctl00$ctl00$ctl00 System.Web.UI.WebControls.Literal 38 0 0
ctl00$ctl00$linkElement System.Web.UI.WebControls.Literal 88 136 0
aspnetForm System.Web.UI.HtmlControls.HtmlForm 13794 0 0
ctl00$ctl00$ctl01 System.Web.UI.LiteralControl 117 0 0
ctl00$ctl00$navigationBar ASP.navigationbar_ascx 8014 0 0
ctl00$ctl00$navigationBar$ctl02 System.Web.UI.DataBoundLiteralControl 780 88 0
ctl00$ctl00$navigationBar$ctl00 System.Web.UI.WebControls.Literal 28 0 0
ctl00$ctl00$navigationBar$ctl03 System.Web.UI.LiteralControl 159 0 0
ctl00$ctl00$navigationBar$ctl01 System.Web.UI.WebControls.HyperLink 93 0 0
ctl00$ctl00$navigationBar$ctl04 System.Web.UI.DataBoundLiteralControl 625 96 0
ctl00$ctl00$navigationBar$imageRepeater System.Web.UI.WebControls.Repeater 6079 28 0
ctl00$ctl00$navigationBar$imageRepeater$ctl00 System.Web.UI.WebControls.RepeaterItem 1564 0 0
ctl00$ctl00$navigationBar$imageRepeater$ctl00$ctl00 System.Web.UI.DataBoundLiteralControl 1564 768 0
ctl00$ctl00$navigationBar$imageRepeater$ctl01 System.Web.UI.WebControls.RepeaterItem 1290 0 0
ctl00$ctl00$navigationBar$imageRepeater$ctl01$ctl00 System.Web.UI.DataBoundLiteralControl 1290 400 0
ctl00$ctl00$navigationBar$imageRepeater$ctl02 System.Web.UI.WebControls.RepeaterItem 1603 0 0
ctl00$ctl00$navigationBar$imageRepeater$ctl02$ctl00 System.Web.UI.DataBoundLiteralControl 1603 820 0
ctl00$ctl00$navigationBar$imageRepeater$ctl03 System.Web.UI.WebControls.RepeaterItem 1622 0 0
ctl00$ctl00$navigationBar$imageRepeater$ctl03$ctl00 System.Web.UI.DataBoundLiteralControl 1622 848 0
ctl00$ctl00$navigationBar$ctl05 System.Web.UI.LiteralControl 250 0 0
ctl00$ctl00$ctl02 System.Web.UI.LiteralControl 164 0 0
ctl00$ctl00$content System.Web.UI.WebControls.ContentPlaceHolder 571 0 0
ctl00$ctl00$content$ctl00 System.Web.UI.LiteralControl 6 0 0
ctl00$ctl00$content$content System.Web.UI.WebControls.ContentPlaceHolder 563 0 0
ctl00$ctl00$content$content$ctl01 System.Web.UI.LiteralControl 2 0 0
ctl00$ctl00$content$content$ctl00 System.Web.UI.WebControls.Literal 303 0 0
ctl00$ctl00$content$content$ctl02 System.Web.UI.LiteralControl 14 0 0
ctl00$ctl00$content$content$exceptionMessageLabel0 System.Web.UI.WebControls.Label 127 0 0
ctl00$ctl00$content$content$ctl03 System.Web.UI.LiteralControl 2 0 0
ctl00$ctl00$content$content$exceptionMessageLabel1 System.Web.UI.WebControls.Label 113 0 0
ctl00$ctl00$content$content$ctl04 System.Web.UI.LiteralControl 2 0 0
ctl00$ctl00$content$ctl01 System.Web.UI.LiteralControl 2 0 0
ctl00$ctl00$ctl03 System.Web.UI.ResourceBasedLiteralControl 325 0 0
ctl00$ctl00$buttonRow System.Web.UI.WebControls.ContentPlaceHolder 526 0 0
ctl00$ctl00$buttonRow$ctl00 System.Web.UI.LiteralControl 102 0 0
ctl00$ctl00$buttonRow$yellowCornerElement System.Web.UI.WebControls.Literal 119 176 0
ctl00$ctl00$buttonRow$ctl01 System.Web.UI.LiteralControl 76 0 0
ctl00$ctl00$buttonRow$arrowElement System.Web.UI.WebControls.Literal 0 0 0
ctl00$ctl00$buttonRow$ctl02 System.Web.UI.LiteralControl 40 0 0
ctl00$ctl00$buttonRow$buttons System.Web.UI.WebControls.ContentPlaceHolder 141 0 0
ctl00$ctl00$buttonRow$buttons$ctl00 System.Web.UI.LiteralControl 2 0 0
ctl00$ctl00$buttonRow$buttons$button1 System.Web.UI.WebControls.Button 137 0 0
ctl00$ctl00$buttonRow$buttons$ctl01 System.Web.UI.LiteralControl 2 0 0
ctl00$ctl00$buttonRow$ctl03 System.Web.UI.LiteralControl 25 0 0
ctl00$ctl00$buttonRow$yellowCornerElementBIDI System.Web.UI.WebControls.Literal 0 16 0
ctl00$ctl00$buttonRow$ctl04 System.Web.UI.LiteralControl 23 0 0
ctl00$ctl00$ctl04 System.Web.UI.ResourceBasedLiteralControl 257 0 0
ctl00$ctl00$titleBar System.Web.UI.WebControls.ContentPlaceHolder 44 0 0
ctl00$ctl00$titleBar$ctl00 System.Web.UI.LiteralControl 6 0 0
ctl00$ctl00$titleBar$titleBar System.Web.UI.WebControls.ContentPlaceHolder 36 0 0
ctl00$ctl00$titleBar$titleBar$ctl01 System.Web.UI.LiteralControl 2 0 0
ctl00$ctl00$titleBar$titleBar$ctl00 System.Web.UI.WebControls.Literal 32 0 0
ctl00$ctl00$titleBar$titleBar$ctl02 System.Web.UI.LiteralControl 2 0 0
ctl00$ctl00$titleBar$ctl01 System.Web.UI.LiteralControl 2 0 0
Session State
Session Key Type Value
WebAdminApplicationPath System.String /
WebAdminPhysicalPath System.String D:\DLT\Documentos\Mio\Segito\ORM\dnauck-AspSQLProvider-f75c655\src\Example
WebAdminRemotingManager System.Web.Administration.WebAdminRemotingManager System.Web.Administration.WebAdminRemotingManager
WebAdminTargetAppId <null> <null>
WebAdminUrlStack System.Collections.Stack System.Collections.Stack
WebAdminCurrentUser <null> <null>
h1. WebAdminCurrentException System.Web.Administration.WebAdminException System.Web.Administration.WebAdminException: this[] index value at System.Web.Administration.WebAdminPage.CallWebAdminHelperMethod(Boolean isMembership, String methodName, Object[] parameters, Type[] paramTypes) at ASP.security_security_aspx.UpdateProviderUI()
Application State
Application Key Type Value
Request Cookies Collection
Name Value Size
ASP.NET_SessionId azc0ncifnikv0febedvfpx45 42
Response Cookies Collection
Name Value Size
Headers Collection
Name Value
Connection Keep-Alive
Accept image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-silverlight, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */*
Accept-Encoding gzip, deflate
Accept-Language en-us
Cookie ASP.NET_SessionId=azc0ncifnikv0febedvfpx45
Host localhost:1540
User-Agent Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Avant Browser; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Response Headers Collection
Name Value
X-AspNet-Version 2.0.50727
Cache-Control no-cache
Pragma no-cache
Expires -1
Content-Type text/html
Form Collection
Name Value
Querystring Collection
Name Value
Server Variables
Name Value
ALL_HTTP HTTP_CONNECTION:Keep-Alive HTTP_ACCEPT:image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-silverlight, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, /* HTTP_ACCEPT_ENCODING:gzip, deflate HTTP_ACCEPT_LANGUAGE:en-us HTTP_COOKIE:ASP.NET_SessionId=azc0ncifnikv0febedvfpx45 HTTP_HOST:localhost:1540 HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Avant Browser; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
ALL_RAW Connection: Keep-Alive Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-silverlight, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */ Accept-Encoding: gzip, deflate Accept-Language: en-us Cookie: ASP.NET_SessionId=azc0ncifnikv0febedvfpx45 Host: localhost:1540 User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Avant Browser; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
APPL_MD_PATH
APPL_PHYSICAL_PATH C:\WINNT\Microsoft.NET\Framework\v2.0.50727\asp.netwebadminfiles\
AUTH_TYPE NTLM
AUTH_USER PC31\Administrator
AUTH_PASSWORD
LOGON_USER PC31\Administrator
REMOTE_USER PC31\Administrator
CERT_COOKIE
CERT_FLAGS
CERT_ISSUER
CERT_KEYSIZE
CERT_SECRETKEYSIZE
CERT_SERIALNUMBER
CERT_SERVER_ISSUER
CERT_SERVER_SUBJECT
CERT_SUBJECT
CONTENT_LENGTH 0
CONTENT_TYPE
GATEWAY_INTERFACE
HTTPS
HTTPS_KEYSIZE
HTTPS_SECRETKEYSIZE
HTTPS_SERVER_ISSUER
HTTPS_SERVER_SUBJECT
INSTANCE_ID
INSTANCE_META_PATH
LOCAL_ADDR 127.0.0.1
PATH_INFO /asp.netwebadminfiles/security/security0.aspx
PATH_TRANSLATED C:\WINNT\Microsoft.NET\Framework\v2.0.50727\asp.netwebadminfiles\security\security0.aspx
QUERY_STRING
REMOTE_ADDR 127.0.0.1
REMOTE_HOST 127.0.0.1
REMOTE_PORT
REQUEST_METHOD GET
SCRIPT_NAME /asp.netwebadminfiles/security/security0.aspx
SERVER_NAME localhost
SERVER_PORT 1540
SERVER_PORT_SECURE 0
SERVER_PROTOCOL HTTP/1.1
SERVER_SOFTWARE
URL /asp.netwebadminfiles/security/security0.aspx
HTTP_CONNECTION Keep-Alive
HTTP_ACCEPT image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-silverlight, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, */*
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT_LANGUAGE en-us
HTTP_COOKIE ASP.NET_SessionId=azc0ncifnikv0febedvfpx45
HTTP_HOST localhost:1540
HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Avant Browser; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082
My Web.config file >>>>>>>>>>>>>>>>>>>>>>>>>>>
<connectionStrings>
<clear />
<add name="AspSQLProvider" connectionString="Server=x.x.x.x;Port=5432;Database=logintest;User Id=lolo;Password=lolo;Encoding=UNICODE;Pooling=true;" />
</connectionStrings>
.......
<membership defaultProvider="PgMembershipProvider">
<providers>
<clear />
<add name="PgMembershipProvider" type="NauckIT.PostgreSQLProvider.PgMembershipProvider" connectionStringName="AspSQLProvider" requiresUniqueEmail="true" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" passwordFormat="Hashed" applicationName="AspSQLProvider Example" />
</providers>
</membership>
<roleManager enabled="true" defaultProvider="PgRoleProvider" cacheRolesInCookie="true" cookieName=".AspNetRoles" cookiePath="/" cookieProtection="All" cookieRequireSSL="false" cookieSlidingExpiration="true" createPersistentCookie="false" cookieTimeout="30" maxCachedResults="25">
<providers>
<clear />
<add name="PgRoleProvider" type="NauckIT.PostgreSQLProvider.PgRoleProvider" connectionStringName="AspSQLProvider" applicationName="AspSQLProvider Example" />
</providers>
</roleManager>