Re: Form-base Authentication - Protect single Controls included in ASPX Pages

From: Daniel Albisser (daniel.albisser@spam.swisscom.com)
Date: 04/22/03

  • Next message: Chirag Desai: ""Messaging Queue not Installed" error using asp.net"
    From: "Daniel Albisser" <daniel.albisser@spam.swisscom.com>
    Date: Tue, 22 Apr 2003 08:49:55 +0200
    
    

    Thanks anyway...
    I placed the different protected user controls each in a separated page
    and so it works :o(

    I already knew the other way you suggested, but I thought about to use the
    provided techniques.

    Thanks and have a nice day!
    Greetz,
    Dan

    "Victor Garcia Aprea [MVP]" <vga@NOobiesSPAM.com> wrote in message
    news:uFFuQwQBDHA.1888@TK2MSFTNGP12.phx.gbl...
    > Hi Daniel,
    >
    > You can't protect ascx files that way. What you could do, is to check in
    the
    > usercontrols that you don't want to allow access for non-authenticated if
    > the user has been authenticated and if not redirect them to the login
    page.
    >
    > --
    > Victor Garcia Aprea
    > Microsoft MVP | ASP.NET
    >
    > "Daniel Albisser" <daniel.albisser@spam.swisscom.com> wrote in message
    > news:1050503189.283983@exnews...
    > > Hello,
    > >
    > > I have a aspx page htat includes a PlaceHolder. The PlaceHolder switchs
    > > different UserCotntrols. A few of this UserControls should be protected
    > > that just authenticated users can access.
    > >
    > > My Web.Config includes following entries:
    > > ....
    > > <authentication mode="Forms">
    > > <forms name="StreamItAuth" path="/" loginUrl="Login.aspx"
    protection="All"
    > > timeout="30">
    > > </forms>
    > > </authentication>
    > > ....
    > > <location path="UserDetails.aspx">
    > > <system.web>
    > > <authorization>
    > > <deny users="?" />
    > > </authorization>
    > > </system.web>
    > > </location>
    > > ....
    > >
    > > It works if I protect whole pages!
    > >
    > > And now I would like to know how I can define the location path of a
    > > control that should be protected?
    > > E.g. <location path="src/controls/dummycontrol.ascx">
    > >
    > > Could somebody help me please....
    > > Would be very great!
    > >
    > > Thanks a lot and have a nice day!
    > > Greetz,
    > > Dan
    > >
    > >
    > >
    >
    >


  • Next message: Chirag Desai: ""Messaging Queue not Installed" error using asp.net"

    Relevant Pages