Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Response redirect Doesnt Work

Reply
Thread Tools

Response redirect Doesnt Work

 
 
dave
Guest
Posts: n/a
 
      11-26-2003
Why oh why doesnt this work???


I have a simple forms authentication that all works fine, ie it validates
user details against a db.

When i try to redirect it goes off to nowhere.

eg - code snippet:

FormsAuthentication.SetAuthCookie(dat("USER_ID"), AutoLogin.Checked)
Context.Response.Redirect("index.aspx")
'and tried just Response.Redirect("index.aspx")

Both of which look like they are going off somewhere, but never reach the
desired page. I have also tried the following within the <HTML> tag, but
still the same result?

if User.Identity.IsAuthenticated then
response.redirect("index.aspx")
end if


This is driving me totally nuts!

Hope someone can help.




 
Reply With Quote
 
 
 
 
Randy Charles Morin
Guest
Posts: n/a
 
      11-27-2003
Have you tried calling Response.End after the redirect? I do it out of
habit, don't know if it actually makes a dif.

Randy
http://www.kbcafe.com

"dave" <> wrote in message news:<#>...
> Why oh why doesnt this work???
>
>
> I have a simple forms authentication that all works fine, ie it validates
> user details against a db.
>
> When i try to redirect it goes off to nowhere.
>
> eg - code snippet:
>
> FormsAuthentication.SetAuthCookie(dat("USER_ID"), AutoLogin.Checked)
> Context.Response.Redirect("index.aspx")
> 'and tried just Response.Redirect("index.aspx")
>
> Both of which look like they are going off somewhere, but never reach the
> desired page. I have also tried the following within the <HTML> tag, but
> still the same result?
>
> if User.Identity.IsAuthenticated then
> response.redirect("index.aspx")
> end if
>
>
> This is driving me totally nuts!
>
> Hope someone can help.

 
Reply With Quote
 
 
 
 
Raj Lealh
Guest
Posts: n/a
 
      11-28-2003
This problem is driving me nuts too!!

Response.End does not work either. :0(

I've seen some strange things happen. I do have a version that works...

But when I use a web service to authenticate (called when submitting
username and password), the call to:

Response.Redirect(
FormsAuthentication.GetRedirectUrl(txtUserName.Tex t,
false));

does not work, but just loops on the login page.

Is there anyone that knows why?


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
dave
Guest
Posts: n/a
 
      11-29-2003
FOUND IT!

The reason in my case was SmartNavigation="True" was set at the top of the
login.aspx page - soon as i removed it - it starting working.

Hope this helps others......




"Raj Lealh" <> wrote in message
news:...
> This problem is driving me nuts too!!
>
> Response.End does not work either. :0(
>
> I've seen some strange things happen. I do have a version that works...
>
> But when I use a web service to authenticate (called when submitting
> username and password), the call to:
>
> Response.Redirect(
> FormsAuthentication.GetRedirectUrl(txtUserName.Tex t,
> false));
>
> does not work, but just loops on the login page.
>
> Is there anyone that knows why?
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
Raj Lealh
Guest
Posts: n/a
 
      11-30-2003
I found the problem was due to the size of the cookie (> 4.0 KB)

I was trying to populate the cookie with group names retrieved from
parsing through Windows 2000 Active Directory. The size of the output
(xml) was too big, just over 4.0 kb, since I retrieved all nested groups
that the user belonged to.

I ended up implementing forms authentication without cookies, and now it
works fine. You just have to put in a few extra measures to deal with
security of the mangled URL... ;o)

example of mangled url (contains session id in brackets):

http://myserver.edu/(weQWerw34534532456)/admin.aspx

Interesting.. eh?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
sort list doesnt work, key=str still doesnt work notnorwegian@yahoo.se Python 3 05-27-2008 04:32 AM
PC doesnt boot first time and doesnt shutdown dann Computer Support 6 08-21-2006 07:31 AM
Context.Response.Redirect("Page.aspx"); doesnt' work under Firefox? gabriel ASP .Net Security 2 08-03-2005 02:08 PM
Basic Q - Response.Redirect, all redirect to first Response.Redirect statement Sal ASP .Net Web Controls 1 05-15-2004 03:46 PM
Response.buffer doesnt work Copa ASP General 0 08-21-2003 05:13 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57