The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Overriding ApplicationName in SqlMembershipProvider

Hi,

I'm trying to set the ApplicationName value in the following code at runtime using a session["myValue"]. I dont seem to be able to do this in the following code, replacing "1" with session["myValue"]. Can anyone point me in the right direction?

Thanks
Kieran


using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Summary description for MyMembershipProvider
/// </summary>
public class MyMembershipProvider : System.Web.Security.SqlMembershipProvider
{
    public MyMembershipProvider()
    {
        //
        // TODO: Add constructor logic here
        //
    }

    public override string ApplicationName
    {
        get
        {
            return "1";
        }
        set
        {
            throw new Exception("The method or operation is not implemented.");
        }
    }

   
}
Kieran
Wednesday, July 05, 2006
 
 
Look like I was overcomplicating this, I simply put this in page_load:

        Membership.ApplicationName = "test";

to change the application name.

Kieran
Kieran
Wednesday, July 05, 2006
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz