Customer Membership Provider Issues

  • Thread starter Thread starter Zeb
  • Start date Start date
Z

Zeb

Hi all.

If anyone could offer any help with this, it would really be
appreciated.

I've written a custom membership provider which works with tables in
my ms sql database. This works great locally, but as soon as I run the
site on the live (shared) server, I get the following error message:

Parser Error Message: Attempt to access the method failed.

The line in Web.Config that it's picked up on is as follows:

Line 29: <providers>
Line 30: <clear/>
Line 31: <add name="AspNetCustomMembershipProvider"
type="CustomMembershipProvider.CustomMembershipProvider"/>
Line 32: </providers>
Line 33: </membership>

I've played around with sn.exe to create a key and linked the project
to it and this hasn't made any difference. The only other thing I can
think of is that the dll files don't have execute permission on the
server and I don't have an option to change that.

I'm completely stumped. Is there something I've missed during the
upload? Do I need a reference somewhere? Could the server be
configured to not allow this kind of thing?

Any ideas to point me in the right direction would be great.

Thanks!
 
Well I've discovered that overriding the MembershipProvider requires
Full Trust on the server and that the way around this is to add the
following to the top of my CustomMembershipProvider:

[assembly: AllowPartiallyTrustedCallersAttribute()]

However, when I do this, I get the following error when I try to
publish the site:

Duplicate 'System.Security.AllowPartiallyTrustedCallersAttribute'
attribute

and it just points to a temporary file called App_Code.19.cs.

So although I've got a little further with this I'm still not sure
what to do next...
 
Back
Top