Thanks, John.
I wasn't really clear explaining the problem. I do realize that an empty
ReturnUrl parameter is an exceptional case, occuring when the user goes
directly to the authentication page. I was trying to figure out whether it's
possible to somehow change the behavior of GetRedirectUrl() to return a page
that I consider a default.
Just like you said, I can always check ReturnUrl and manually set it. I
didn't care much for this approach because that would imply that I am
hardcoding that page that I consider a default. So, I thought maybe there is
a way to alter the bahavior of GetRedirectUrl() by tweaking something in
either web.config or in IIS.
Or, I just realized, I guess I could just add a key to web.config myself,
read it in, and use it in my app, instead of hardcoding it.
Thanks again.
VR
[quoted text, click to view] "John Saunders" <john.saunders at surfcontrol.com> wrote in message
news:OIa1nERrDHA.1096@TK2MSFTNGP11.phx.gbl...
> "VR" <anonymous@discussions.microsoft.com> wrote in message
> news:045901c3acdb$d2c2e870$a401280a@phx.gbl...
> > Hi,
> >
> > I am using Forms type of authentication, but having
> > problems redirecting users to default page after they get
> > authenticated.
>
> What if the user doesn't want to go to your default page?
>
> The way Forms Authentication works is that when a user tries to go to a
page
> which requires authentication and they're not authenticated, they get
> redirected to your login page instead. The redirection includes the
desired
> page in the ReturnUrl query parameter. When they've authenticated, they're
> meant to be redirected to the page they requested.
>
> When MSDN says "if there is no original URL", they're referring to the
case
> where the user goes directly to your login page, so that there is no
> ReturnUrl parameter. In this case, the default is to go to default.aspx.
You
> can change this by "manually" checking to see if there's a ReturnUrl
> parameter. If there isn't, you can redirect to "/public/default.aspx".
>
> BTW, the default document in IIS is just a file name and extension, not a
> path. It simply says what file name IIS will request when the user
> specifies, e.g., http://yoursite/ and doesn't specify a file name.
> --
> John
>
>
>