Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...Redirect({URL},True) causes occasional session lostRedirect({URL},True) causes occasional session lost
Previous
 
Next
New Post
10/13/2010 11:42 AM
 
I was wondering if someone could explain to me why the DNN base code always uses EndResponse = True when  doing a redirect?

I can understand that this is necessary sometimes but it seems to be used regardless of whether it's necessary?  

I find this unusual because as far as I know this the opposite of Microsoft's recommended approach.
"we recommend that instead of this overload you use the HttpResponse.Redirect(String, Boolean) overload and pass false for the endResponse parameter, and then call the CompleteRequest method."  -> http://msdn.microsoft.com/en-us/libra...

The reason I'm asking is because the DNN site I took over maintanace for has EndResponse = True all over the place (copied from DNN core code example I'm sure) and it seems to cause the session info to sporadically disappear when running in DNN 5.5/.NET4.0.

Before I switch the custom code I thought I'd try to get some more information on why the base DNN code is using this pattern?

Thanks in advance for any insight you can give.

Tommy
 
New Post
10/13/2010 12:13 PM
 
This is because more often than not, the overload allows us to prevent errors that spawn from multi-threading. FYI - "Us" is used as more of a collective noun, and doesn't necessarily mean that I am one of the engineers. ;)

Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
New Post
10/13/2010 1:03 PM
 
Thanks Will for the info:

'This is because more often than not, the overload allows us to prevent errors that spawn from multi-threading'

However, I am not aware of a general issue involving Redirects and Multi-threading, and I just Googled it and didn't find anything, can you elaborate a bit more please? 


Thanks again,
 
New Post
10/13/2010 1:23 PM
 
If you don't call the overload, and there is a spawned thread running in the background, you will give your end-users the "yellow screen of death".  I ran into this time and time again.  This is one of the main arguments against using threads in web applications, but there are times where threading is necessary.  Threading is not highly prevalent in DNN, but it is there.

Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...Redirect({URL},True) causes occasional session lostRedirect({URL},True) causes occasional session lost


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out