我看到下面的异常。未将对象引用设置为对象的实例
System.NullReferenceException:未将对象引用设置为对象的实例。 at System.Web.Util.StringUtil.memcpyimpl(Byte * src,Byte * dest,Int32 len) at System.Web.Util.StringUtil.UnsafeStringCopy(String src,Int32 srcIndex,Char [] dest,Int32 destIndex,Int32 LEN) 在System.Web.HttpWriter.Write(字符串或多个) 在System.Web.HttpResponse.Write(字符串或多个)
我已经在上下文以下检查到我响应。
return !(context == null || context.Response == null ||
context.Response.OutputStream == null ||
!context.Response.OutputStream.CanWrite);
任何人都可以提示什么可能会导致此?
//获取文本书写器的本地副本 \t \t \t TextWriter writer = context.Response.Output; \t \t \t \t \t \t //写出消息映射 \t \t \t writer.Write( “输出数据...”); – user68575 2009-02-19 19:40:21