Re: Configuring FormsAuthentication from code

From: Paul Mason (masonp_at_cancer.bham.ac.uk)
Date: 07/14/04


Date: Wed, 14 Jul 2004 14:06:37 +0100


I'm afraid you're stuck with it....You're going to have to change the way
that you approach this. In the logon page you have programmatic control,
but only after you've athenticated (however you do that).

You're better off routing into one "mode" or another after you've logged in.
It all depends on what exactly you're attempting to do. If you are trying
to make sure a customer only has access to certain bits of your software,
you may need to include an encrypted file or registry setting in your setup
that include flags that set the "mode"...

P

"ringi" <ringi@discussions.microsoft.com> wrote in message
news:F516F97A-1D98-4368-A6C2-BD695C7C71F5@microsoft.com...
> Hi Jim,
>
> Thanks for your response,
>
> My specific situation is that we ship a web browser based application to
our customers. Each customer installs iis on their own server. Depending
how the customer is going to use the application they put it in a different
"mode" at installation time. Different "modes" need different logon pages.
>
> When the customer sets the 'mode' that the application will run in, they
should only have to change the configuration in ONE place, e.g. one line in
the web.config file. However due to the fact that I can find no way to
control FormsAuthentication form software, I have to tell then to ALSO
change to set-up of FormsAuthentication in web.config.
>
> I can not just rename the logon pages, when the "mode" is change, as the
installer for the application set up each logon page differently in iis.
>
> I do not like sealed boxes, that I can not control from my code!
>
> Ian Ringrose
> Ringi at bigfoot dot com
>
>
> "Jim Cheshire [MSFT]" wrote:
>
> > Hi Ian,
> >
> > You cannot do this. The loginUrl is set when the application domain is
> > loaded. If you were to change that programmatically, you would need to
> > reload the app domain for it to take effect, and that would cause
everyone
> > accessing the application to lose Session variables and their
> > authentication. Even if you could do it, it would be a very bad
practice.
> >
> > I'm not quite sure what you specific situation is, but it might be worth
> > mentioning that the default loginUrl is default.aspx. Therefore, if you
> > don't set a loginUrl, default.aspx will be the loginUrl. You may be
able
> > to simply change which page is named default.aspx based upon
configuration
> > of your application. Once again, I'm not certain what you are doing and
> > what issues you are encountering, so I hope that helps.
> >
> > Jim Cheshire [MSFT]
> > MCP+I, MCSE, MCSD, MCDBA
> > Microsoft Developer Support
> > jamesche@online.microsoft.com
> >
> > This post is provided "AS-IS" with no warranties and confers no rights.



Relevant Pages

  • RE: If I enter in one the other auto populate.
    ... Dave Hargis, Microsoft Access MVP ... "Candace" wrote: ... Confrim the Control Source Property of this control is the company id field ... you populate the Customer ID control....the ...
    (microsoft.public.access.forms)
  • RE: If I enter in one the other auto populate.
    ... Confrim the Control Source Property of this control is the company id field ... Dave Hargis, Microsoft Access MVP ... "Candace" wrote: ... you populate the Customer ID control....the ...
    (microsoft.public.access.forms)
  • RE: If I enter in one the other auto populate.
    ... Candace, I don't mean to be rude, but please adjust your attitude. ... Confrim the Control Source Property of this control is the company id field ... Dave Hargis, Microsoft Access MVP ... you populate the Customer ID control....the ...
    (microsoft.public.access.forms)
  • RE: Nothing is showing up in form view
    ... to bind each heading to a control on the form. ... But when I select a customer ... The record source query for your orders form should be based ... Your Shipped table should be related to your Order Detail table based on the ...
    (microsoft.public.access.externaldata)
  • RE: ObjectDataSource in ASP.NET 2.0
    ... For datasourcecontrol and databindig control, ... it don't quite makesense to maintain such a in-memory reference. ... again from orginal datasource, e.g: ... | Customer customer = new Customer; ...
    (microsoft.public.dotnet.framework.aspnet)