惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
V
V2EX
大猫的无限游戏
大猫的无限游戏
腾讯CDC
博客园 - Franky
WordPress大学
WordPress大学
Jina AI
Jina AI
GbyAI
GbyAI
云风的 BLOG
云风的 BLOG
B
Blog RSS Feed
Last Week in AI
Last Week in AI
The Cloudflare Blog
V
Visual Studio Blog
P
Proofpoint News Feed
博客园 - 叶小钗
L
LangChain Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Recorded Future
Recorded Future
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
The Blog of Author Tim Ferriss
人人都是产品经理
人人都是产品经理
Y
Y Combinator Blog
罗磊的独立博客
雷峰网
雷峰网
博客园 - 【当耐特】
Microsoft Security Blog
Microsoft Security Blog
L
LINUX DO - 热门话题
Cisco Talos Blog
Cisco Talos Blog
L
Lohrmann on Cybersecurity
Martin Fowler
Martin Fowler
Spread Privacy
Spread Privacy
MongoDB | Blog
MongoDB | Blog
Engineering at Meta
Engineering at Meta
C
Cybersecurity and Infrastructure Security Agency CISA
小众软件
小众软件
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Recent Announcements
Recent Announcements
T
Threat Research - Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
量子位
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
宝玉的分享
宝玉的分享
D
DataBreaches.Net
T
The Exploit Database - CXSecurity.com
Vercel News
Vercel News
IT之家
IT之家
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
T
Troy Hunt's Blog
aimingoo的专栏
aimingoo的专栏

博客园 - 今夜太冷

GPG(GnuPG)入门 c++中POD类型和non-POD类型 关于c++ template的branching和Recursion的一段很好的描述 How do I remove a particular element from an array in JavaScript? Get the client's IP address in socket.io 前端 使用 crypto-js 对数据进行对称加密 C++ delegate的几种方法 MFC更换窗口图标 boost::make_function_output_iterator报错: C4996 How to copy the contents of std::vector to c-style static array,safely? std::vector push_back报错Access violation Structured Exception Handling Catch a Memory Access Violation in C++ Windows上的字符转换之CP_ACP和CP_OEMCP Initialize a vector in C++ (5 different ways) MFC中使用ATL报错:error C4430: missing type specifier - int assumed. Note: C++ does not support default-int C++ WINDOWS下 wchar_t *和char * 相互转化总结篇 VS2008 编译出错 fatal error C1859: unexpected precompiled header error, simply rerunning the compiler might fix this problem 解析XML出错,无法创建DOMDocument对象
Session variables lost after the call of Response.Redirect method
今夜太冷 · 2018-09-14 · via 博客园 - 今夜太冷

From:  https://forums.asp.net/t/2096848.aspx?Session+variables+lost+after+the+call+of+Response+Redirect+method

[问题]

Hi Everyone,

In my asp.net application after I login, my session variables, which I set in login page, are getting lost after the call to Response.Redirect method.

After googling I found the below link elaborate the cause of the problem.

http://weblogs.asp.net/bleroy/Don_2700_t-redirect-after-setting-a-Session-variable-_2800_or-do-it-right_2900_

I really couldn't get the solution suggested in the above link.

I didn't get the error or the issue was not there for a month. It suddenly appeared yesterday and I'm unable to use my session variables if use Response.Redirect method, even with the second argument with 'false', ie. Response.Redirect(URL,false);

Why I got the error all of a sudden? And what is the solution?

[回答]

Hi ArunCode47,

Have you tried setting cookieless="true" in web.config? Check that enableSessionState hasn't been set to false in the web.config.

<configuration>
  <system.web>
<pages enableSessionState="true"> <sessionState cookieless="true" regenerateExpiredSessionId="true" timeout="30" /> </system.web> </configuration>

ASP.NET Session State Overview

Cookieless ASP.NET

Best Regards,

Chris