Re: Default.aspx - newbie Q`

From: Curt_C [MVP] (software_AT_darkfalz.com)
Date: 03/08/04


Date: Mon, 8 Mar 2004 15:29:12 -0600

Ahhh..... I see now.
You are saying that they AREN'T getting redirected to the login page when
then first hit the site....
I'd suggest reversing your system.
Set the login.aspx as the default page, but have the PAGE_LOAD do a auth
check and redirect to the ReturnURL or Selected.aspx depending on the case.
I mean no one will ever hit the Selected.aspx when its default without first
hitting the login.aspx anyway.

-- 
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Colin Basterfield" <colinbasterfield@hotmail.com> wrote in message
news:%23qox$MVBEHA.3548@TK2MSFTNGP10.phx.gbl...
> No it's me not explaining myself very well.
>
> OK, I'll try another way.  Is it reasonable to expect the user to have to
> type in the whole path,
>
> e.g. www.mywebsite.com/selection.aspx ?
>
> The point is at the moment if the User only types www.mywebsite.com they
get
> a 'You are not authorised to view this page' error message.
>
> So my question is what do/can I do to remove that rather unfriendly
message
> and replace it with something that takes then straight to the login page.
>
> So you are correct it is doing what it should, but I want to make the
whole
> rather more friendly.
>
> Thanks for your patience, we live in the South Island of New Zealand and
> there aren't many folk who I can bounce these things around with, so I am
> mightily grateful for these newsgroups, that's for sure.!
>
> Cheers
> Colin
>
> "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
> news:ufjZNtUBEHA.1732@TK2MSFTNGP12.phx.gbl...
> > if the selected.aspx is the default page then that's where they'll go,
if
> > authenticated... the thing is that you have FORMS auth, if they just
> opened
> > their browser, they aren't authenticated, so they'll get sent to
> > login.aspx... Am I missing something...isnt' it acting EXACTLY as it
> should?
> >
> > -- 
> > Curt Christianson
> > Owner/Lead Developer, DF-Software
> > www.Darkfalz.com
> >
> >
> > "Colin Basterfield" <colinbasterfield@hotmail.com> wrote in message
> > news:uYcD%23pUBEHA.3404@TK2MSFTNGP10.phx.gbl...
> > Hi Curt,
> >
> > Firstly thanks, secondly just to clarifymy understanding:
> >
> > Currently I set it back to how it originally worked.  I have
> > <!--
> > <authentication mode="Forms">
> > <forms name="SiteSummAuth" loginUrl="Login.aspx" path="/" />
> >
> > </authentication>
> >
> > <authorization>
> >
> > <deny users="?" />
> >
> > </authorization>
> >
> > -->
> >
> > set up in my web.config, and I have sselection.aspx as my start page,
but
> > because of the config it goes to login.aspx, so provided you type in the
> > browser www.mywebsite.com/login.aspx it works fine.  With the correct
> > username and password you get to the selection.aspx, because the login
> does
> > a redirect to it, and that is fine, and beyond.
> >
> > I want to have the users be able to just type www.mywebsite.com and it
go
> to
> > the login.aspx screen if not already authenticated or direct to
> > selection.aspx if authenticated
> >
> > As an aside when I set a page to be the start page in my
solution/project
> > where does that information get stored?  What gets stored in the app
that
> I
> > upload thro FTP to my host that tells it which page is the start page?
> Are
> > there any docs/tutorials about this because I am so green about this
part
> of
> > ASP.NET development...
> >
> > thanks again
> >
> > Colin
> >
> > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
> > news:OiNPjeUBEHA.2888@TK2MSFTNGP09.phx.gbl...
> >
> > > It will try to go to the page specified in the IIS manager first.
> > > If you have the AUTH setup in the web.config to not allow access to
this
> > > page it should redirect to the login page specified in the web.config.
> > After
> > > proper authentication have it redirect back to the URL specified in
the
> > > QueryString.
> > >
> > > -- 
> > > Curt Christianson
> > > Owner/Lead Developer, DF-Software
> > > www.Darkfalz.com
> > >
> > >
> > > "Colin Basterfield" <colinbasterfield@hotmail.com> wrote in message
> > > news:OsKxIVUBEHA.576@TK2MSFTNGP11.phx.gbl...
> > > > Hi,
> > > >
> > > > My ASP.NET has Forms Authentication set up to use a login page, all
> > > > configured in the web.config.  I am in the process of trying to get
it
> > > > running on the site but have come across some problems.  It all
worked
> > but
> > > > if you didn't type in www.mywebsite.com/login.aspx it didn't go to
the
> > > login
> > > > page.  Once authenticated it goes to a selection screen, but this is
> > > called
> > > > selection.aspx, so I thought if I renamed the selection.aspx to
> > > default.aspx
> > > > it would then work if the user typed in www.mywebsite.com but it
tries
> > to
> > > go
> > > > there automatically seemingly w/out taking any notice of the
> > > authentication
> > > > set up, i.e go to login first.
> > > >
> > > > Am I missing something here?  Is it my login page that should be
> called
> > > > default, but no documentation I have yet read does or even suggests
> this
> > > > practice.
> > > >
> > > > So I'm confused, any ideas please
> > > > TIA
> > > > Colin
> > > >
> > > >
> > >
> > >
> >
> >
>
>


Relevant Pages

  • Re: Default.aspx - newbie Q`
    ... check and redirect to the ReturnURL or Selected.aspx depending on the case. ... > and replace it with something that takes then straight to the login page. ... >> Curt Christianson ... >>> authentication ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ASP 2.0 Membership API
    ... After successful authentication, you want to redirect back to the original application, but the returnURL parameter contains only /App1 as the URL. ... The solution to that problem is adding a local login page to the application that does a manual redirect to the central authentication application. ... if not you have to use cookieless auth ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Detecting Failed Authorization
    ... after every authentication request and before the user ... is redirected to any login page. ... > "Ken Dopierala Jr." ... >> 'Redirect where you want the user to go. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Response.Redirect with IE
    ... login page to another one after a successful login - Am I right? ... In that case, set the Authentication mode to "Forms" in Web.Config, set the ... You don't have to manually redirect, Forms Authentication will do it for you ... > From: Ken Dopierala Jr. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: makeing a page visible to everyone without needing to login
    ... > Curt Christianson ... >> accessed after going through forms authentication. ... >> needing to login. ...
    (microsoft.public.dotnet.framework.aspnet)