由于一旦进行了url重写,原先的webform中的action会发生改变,容易造成:请求的资源不存在问题具体怎么样?各位dx看看就清楚了!!!
所有才有了这个responsefilter了,实现如下:
public class responsefilter : system.io.stream
{
public responsefilter(system.io.stream sink, string _str)
{
_sink = sink;
//
// todo: 在此处添加构造函数逻辑
//
this.str = _str;
}
private string str = "";
private system.io.stream _sink;
private long _position;
private system.text.encoding end = system.text.encoding.getencoding("gb18030");
private system.text.stringbuilder ooutput = new system.text.stringbuilder();
// the following members of stream must be overriden.
public override bool canread
{
get { return true; }
}
public override bool canseek
{
get { return true; }
}
public override bool canwrite
{
get { return true; }
}
public override long length
{
get { return 0; }
}
public override long position
{
get { return _position; }
set { _position = value; }
}
public override long seek(long offset, system.io.seekorigin direction)
{
return _sink.seek(offset, direction);
}
public override void setlength(long length)
{
_sink.setlength(length);
}
新闻热点
疑难解答
图片精选