[Mono-bugs] [Bug 391286] New: Several issues with AspNetSqlMembershipProvider

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri May 16 07:42:47 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=391286


           Summary: Several issues with AspNetSqlMembershipProvider
           Product: Mono: Class Libraries
           Version: SVN
          Platform: x86
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Data.SqlClient
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: gunsh at neobee.net
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=215932)
 --> (https://bugzilla.novell.com/attachment.cgi?id=215932)
Files needed to reproduce bug

I have used Mono 1.9.1 on Ubuntu as well as version from SVN from about two
weeks ago.

This bug is about membership provider. Using VS2008 I have built two ASP.NET
pages (Login.aspx and Success.aspx). Login.aspx page uses asp:Login control to
ask user for credentials and Success.aspx is the page user lands on upon
successful login.

On Windows the default membership provider is SQL Server. I have added a single
user to the database using Web Site Administration Tool. With MS.NET everything
works ok. Entering user's credentials ends up with a successful login and
entering anything else reports a bad login. The only user's username/pass is
test/123456-

When I upload the files to Ubuntu and run xsp2, the browser throws an error
(error1.htm) that mentions System.Web.Security.SqliteMembershipProvider. I have
looked up machine.config and found out that system.web/membership/providers
section contains AspNetSqlMembershipProvider which appears to use SQL Server
not SQLite. A connection string for SQLite is defined but it does not appear to
be referenced anywhere. After the sample is run, aspnetdb.sqlite file appears
in App_Data with size 0.

If I add an explicit attribute MembershipProvider="AspNetSqlMembershipProvider"
to <asp:Login>, I still get correct behavior on MS.NET and the very same error
on Mono.

If I deliberately set some bogus string for Membership provider, both MS.NET
and Mono report an error saying that the provider could not be found.

Next I tried to copy/paste AspNetSqlMembershipProvider membership section from
Mono's machine.config to app's web.config. If I leave the name of the provider
intact (effectively a duplicate), MS.NET uses the provider from the web.config
while Mono ignores it and still throws the same error (error1.htm). ### This
paragraph alone describes an inconsistency between Mono and MS.NET.

Finally, if I rename AspNetSqlMembershipProvider to say
AspNetSqlMembershipProvider2 in both web.config and asp:Login's attribute, I
get an improvement from Mono. The error from error1.htm is no longer shown.
Instead the page insists that the user credentials supplied were incorrect.
Needless to say I have also uploaded the contents of App_Data directory with
the prepared database.

So in brief.

1) If there are two providers with the same name in machine.config and
web.config Mono always picks the machine.config one and MS.NET picks the
web.config.

2) The default membership provider in Mono somehow defaults to SQLite despite
settings in machine.config which imply SQL Server.

3) Even when workarounds are implemented for 1) and 2), Mono fails to verify
user's credentials as shown by the attached sample.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list