By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,997 Members | 1,098 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,997 IT Pros & Developers. It's quick & easy.

Customer Membership Provider Issues

P: n/a
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.CustomMembershipPro vider"/>
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!

Jan 29 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Zeb
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.AllowPartiallyTrustedCallersAttri bute'
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...

Jan 29 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.