[Mono-list] System.Web.Security.Membership causes an exception on mono platform

Olli Heiskanen ohjelmistoarkkitehti at gmail.com
Tue Jan 13 15:50:49 UTC 2015


Hello,

I'm trying to deploy a MVC3 site on a CentOS server using mono and mod_mono
on apache. After a week of agonizing installations and configurations, I
got the site up, but a MembershipProvider still acts up. My mono version is
3.10.0, installed from source and got from a git branch.

While the code works fine on a windows machine, in a mono environment I get
an exception while trying to log in, at the row below:
if (Membership.ValidateUser(userid, password))

The exception message is:
An exception was thrown by the type initializer for
System.Web.Security.Membership

The stack trace does not tell much:
  at boa.BoaCommander.Controllers.AccountController.VerifyUser
(System.String userid, System.String password, Boolean rememberme)
[0x00000] in <filename unknown>:0

In my Web.config I have the membership provider defined like this:
<membership defaultProvider="BoaMembershipProvider">
  <providers>
<add name="BoaMembershipProvider"
type="BoaCommander.Providers.BoaMembershipProvider"
connectionStringName="BoaMySqlConnection" applicationName="BOA"
passwordFormat="Hashed"/>
  </providers>
</membership>

... and the class BoaMembershipProvider inherits MembershipProvider.

What can I do to fix this problem? I'd appreciate Your comments.

cheers,
Olli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20150113/543c5baa/attachment.html>


More information about the Mono-list mailing list