RedirectFromLoginPage

G

genc ymeri

hi,
I'm doping a maintenance for a project but I'm having an interesting issue
with RedirectFromLoginPage coomand :)

What happens is that the webapp, once user logs in, he/she goes gets
redirected by default to the default.aspx page thorugh the
RedirectFromLoginPage coomand. What I did, I changed all settting in IIS
(set the document to 'login.aspx') and I made the default page in the
ASP.net project the login.aspx page. I did look in web.config too and I made
sure that RT the me.request("ReturnURL") and is set to nothing.

Somehow the application still goes to default.aspx page.

Does the RedirectFromLoginPage command redirect the app in the
'default.aspx' page by default in case 'me.request("ReturnURL")' is nothing
or should I keep looking for a hidden setting somewhere ?

Anyother tips/ideas will be very much appreciated...

Genc Ymeri
 
W

Winista

If RedirectUrl does not exist in query string then default redirection is
default.aspx

If you are using .Net 2.0 then you can set DefaultUrl property to whatever
page you want.
 
G

genc ymeri

yes, I found it.......

thanks a lot for your input.


public static string GetRedirectUrl(string userName, bool
createPersistentCookie)
{
FormsAuthentication.Initialize();
if (userName == null)
{
return null;
}
HttpContext context1 = HttpContext.Current;
string text1 = context1.Request["ReturnUrl"];
if (text1 == null)
{
text1 = UrlPath.Combine(context1.Request.ApplicationPath,
"default.aspx");
}
return text1;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top