Click here to Skip to main content
15,888,610 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: How to ReturnURL? Pin
Jassim Rahma10-Apr-13 3:06
Jassim Rahma10-Apr-13 3:06 
GeneralRe: How to ReturnURL? Pin
AmitGajjar10-Apr-13 3:10
professionalAmitGajjar10-Apr-13 3:10 
QuestionQuestion of the day post on a web page Pin
Member 87742808-Apr-13 20:25
Member 87742808-Apr-13 20:25 
QuestionDoes Response.Redirect("~/MyPage.aspx", true); clear session on redirect? Pin
Steve Holdorf8-Apr-13 12:04
Steve Holdorf8-Apr-13 12:04 
AnswerRe: Does Response.Redirect("~/MyPage.aspx", true); clear session on redirect? Pin
jkirkerx8-Apr-13 12:38
professionaljkirkerx8-Apr-13 12:38 
GeneralRe: Does Response.Redirect("~/MyPage.aspx", true); clear session on redirect? Pin
Jasmine25018-Apr-13 12:56
Jasmine25018-Apr-13 12:56 
GeneralMessage Closed Pin
8-Apr-13 13:14
professionaljkirkerx8-Apr-13 13:14 
GeneralRe: Does Response.Redirect("~/MyPage.aspx", true); clear session on redirect? Pin
Jasmine25019-Apr-13 5:55
Jasmine25019-Apr-13 5:55 
Yeah if you turn off cookies the session still works by using query strings, and it will default to this mode if a user has set their option to not accept cookies, so you don't have total control over it. It's a good idea to make sure you're saving query strings for that rare case, even if you turn cookies on in the web.config.

This is the key element:

XML
<sessionState 
    mode="[Off|InProc|StateServer|SQLServer|Custom]"
    timeout="number of minutes"
    cookieName="session identifier cookie name"
    cookieless=
         "[true|false|AutoDetect|UseCookies|UseUri|UseDeviceProfile]"
    regenerateExpiredSessionId="[True|False]"
    sessionIDManagerType="session manager type"
    sqlConnectionString="sql connection string"
    sqlCommandTimeout="number of seconds"
    allowCustomSqlDatabase="[True|False]"
    useHostingIdentity="[True|False]"
    stateConnectionString="tcpip=server:port"
    stateNetworkTimeout="number of seconds"
    customProvider="custom provider name"
    compressionEnabled="[True|False]"
    sqlConnectionRetryInterval="number of seconds">
    <providers>...</providers>
</sessionState>


I usually put the "cookieless" to "AutoDetect" because if you pick "UseCookies" and the user has cookies disables, it won't throw an error, but it won't establish a session either. If you're using a web farm, you have to use mode=SQLServer or Custom, where you have to implement session management yourself.
QuestionA potentially dangerous Request.Form value was detected from the client Pin
Member 98570608-Apr-13 11:18
Member 98570608-Apr-13 11:18 
AnswerRe: A potentially dangerous Request.Form value was detected from the client Pin
jkirkerx8-Apr-13 12:46
professionaljkirkerx8-Apr-13 12:46 
Questionemail is going as spam / not reaching destination Pin
Jassim Rahma8-Apr-13 3:04
Jassim Rahma8-Apr-13 3:04 
AnswerRe: email is going as spam / not reaching destination Pin
Jasmine25018-Apr-13 6:55
Jasmine25018-Apr-13 6:55 
AnswerRe: email is going as spam / not reaching destination Pin
jkirkerx8-Apr-13 8:10
professionaljkirkerx8-Apr-13 8:10 
GeneralRe: email is going as spam / not reaching destination Pin
Jasmine25018-Apr-13 11:07
Jasmine25018-Apr-13 11:07 
GeneralRe: email is going as spam / not reaching destination Pin
jkirkerx8-Apr-13 12:32
professionaljkirkerx8-Apr-13 12:32 
GeneralRe: email is going as spam / not reaching destination Pin
Jasmine25018-Apr-13 13:00
Jasmine25018-Apr-13 13:00 
QuestionAJAX Image Loading Pin
Rockstar_8-Apr-13 1:19
professionalRockstar_8-Apr-13 1:19 
AnswerRe: AJAX Image Loading Pin
Karthik Harve8-Apr-13 1:55
professionalKarthik Harve8-Apr-13 1:55 
QuestionMVC 4 Maintain state of the check box,Drop down list Pin
VishwaKL8-Apr-13 0:34
VishwaKL8-Apr-13 0:34 
Question__EVENTTARGET is undefined Pin
GGev7-Apr-13 23:32
GGev7-Apr-13 23:32 
AnswerRe: __EVENTTARGET is undefined Pin
Karthik Harve8-Apr-13 2:01
professionalKarthik Harve8-Apr-13 2:01 
QuestionHow solve (Validation of viewstate MAC failed)? Pin
Jassim Rahma7-Apr-13 0:38
Jassim Rahma7-Apr-13 0:38 
AnswerRe: How solve (Validation of viewstate MAC failed)? Pin
AContractor7-Apr-13 1:48
professionalAContractor7-Apr-13 1:48 
AnswerRe: How solve (Validation of viewstate MAC failed)? Pin
Vani Kulkarni7-Apr-13 20:17
professionalVani Kulkarni7-Apr-13 20:17 
QuestionPlacing & arranging controls on web form Pin
Member 99120916-Apr-13 6:47
Member 99120916-Apr-13 6:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.