Hi Walter,
I have a page that should be authenticated under certain request parameters.
So, in the load method of this page, I check to see if the page needs
authentication or annonumous.
In the load method, if authentication is needed, and not a already
authenticated, I redirect the user to the login page.
(In the redirect URL I also pass in parameters like
"ReturnUrl=%2fN otProtectedFold er%2fDefault.as px")
Then after legitimated login using loginPage.... asp.net sends the user back
to the originally requested URL (that was in the parameters).
Seem to work fine... when I tested.
This is not a protected folder... all I want is to go through loginPage...
only if (based on request parameters) the user needs to be
authenticated.. ...
Nalaka
"Walter Wang [MSFT]" <wa****@online. microsoft.comwr ote in message
news:gy******** ******@TK2MSFTN GHUB02.phx.gbl. ..
Hi Nalaka,
Do you mean to use FormsAuthentica tion.RedirectFr omLoginPage to redirect
to
the page if the user is anonymous but the page is a public one? Please
note
this method is used to redirect an authenticated user back to the
originally requested URL. I don't think it's a good idea to redirect for
anonymous user.
Personally I think Gregory's first suggestion is better and simpler to
implement.
Regards,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support
=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no
rights.