.net cookies问题
写了一个cookie,在本页读值没问题,出了本页就读不出来对象引用未设置为一个实例对象。我用的是英文服务器,在国外
很奇怪,中文服务器没问题
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.Source Error:
Line 17:
Line 18:
Line 19: Response.Write(Request.Cookies["ApplyMoney"]["DealID"].ToString());
Line 20: Response.End();
Line 21:
写了一个cookie,在本页读值没问题,出了本页就读不出来对象引用未设置为一个实例对象。我用的是英文服务器,在国外
很奇怪,中文服务器没问题
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.Source Error:
Line 17:
Line 18:
Line 19: Response.Write(Request.Cookies["ApplyMoney"]["DealID"].ToString());
Line 20: Response.End();
Line 21:
解决方案 »
- 小白问个问题:在visual studio2008 新建网页的时候 已经安装的模板中什么都没有
- 突然想重新学一下数据库 求介绍书
- vs2005在调试无法显示图片
- 有一句程序看不懂
- 奇怪的错误:异常详细信息: System.InvalidCastException: 指定的转换无效。
- 怎样解决表单验证时指向特定的页面
- 在线等待:NullReferenceException异常?
- 导出 EXCEL 并给EXCEL加密,请求方法,小弟感激不尽
- 请问如何写一个Datalist中套着的一个Datalist的ItemDataBound事件
- 关于加号和连接字符串+
- 怎么把谷歌小工具中有个显示本地三天天气的。--我想添加到自己网中--高手帮忙
- 弱弱的问下 地址栏参数问题
aCookie.Domain = "www.xxx.com";
aCookie.Path = "/";
aCookie.Expires = DateTime.Now.AddDays(10);
Response.Cookies.Add(aCookie);如果单独指一个www.xxx.com访问没问题,可以正常前,前题是要设置domail和path,但是"www.xxx.com/wutian"加了虚拟目录在用的时候就不用了,;