更新时间:2023-09-28 23:28:16
您正在将cookie添加到请求.Cookies集合,您希望将其添加到响应.改为收集Cookie.
You're adding cookies to the Request.Cookies collection, you'll want to add them to the Response.Cookies collection instead.
还要注意,Response.Redirect将中止我所见过的当前线程,这有时会导致问题.Response.Redirect(url,false)将重定向而不会中止.
Also note that Response.Redirect will abort the current thread which I've seen cause problems on occasion. Response.Redirect( url, false ) will redirect without aborting.