MySql as Security Provider- local ok, not server

I have built my security configuration to use MySQL for users, roles, etc. I have downloaded the code found at:

http://www.codeproject.com/KB/database/mysqlmembershipprovider.aspx

The whole things works like a charm locally (of course) but not on your server. I get the error below.

Thanks,DAB

Error message below:

Security ExceptionServer Error in '/' Application.

Security Exception
Description: The application attempted to perform an operation not allowed by
the security policy. To grant this application the required permission please
contact your system administrator or change the application's trust level in the
configuration file.

Exception Details: System.Security.SecurityException: That assembly does not
allow partially trusted callers.

Source Error:

An unhandled exception was generated during the execution of the current
web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:


[SecurityException: That assembly does not allow partially trusted callers.]
Andri.Web.MySqlMembershipProvider.ValidateUser(String username, String password) in MySQLMembershipProvider.cs:1292
System.Web.UI.WebControls.Login.AuthenticateUsingMembershipProvider(AuthenticateEventArgs e) +60
System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +119
System.Web.UI.WebControls.Login.AttemptLogin() +115
System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +101
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37..........
 
I'm not a C programmer, so I have to ask:

Where do I add this [assembly:AllowPartiallyTrustedCallers]?
Do I need to create an AssemblyInfo.cs?
I've looked over the web and played around with placing it in Login.vb, the two C# modules, wherever, no luck so far.

Thanks,

DAB
 
Still not working, not trying to get a free C# class out of this :rolleyes: , just want to get this site running.

Here's my AssemblyInfo.cs:

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Security;

[assembly: AllowPartiallyTrustedCallers]
/// <summary>
/// Summary description for AssemblyInfo
/// </summary>
public class AssemblyInfo

{
public AssemblyInfo(string assemblyName)
{

//
// TODO: Add constructor logic here
//
}
}
 
Back
Top