S
SushiSean
Hi. I use IHttpModule for my site (asp.net 3.5 and iis 7)
and there i add response.Filter for my pages.
public void Init(HttpApplication application)
{
application.ReleaseRequestState += new
EventHandler(InstallResponseFilter);
}
private void InstallResponseFilter(object sender, EventArgs e)
{
HttpResponse response = HttpContext.Current.Response;
HttpRequest request = HttpContext.Current.Request;
if ("text/html" == response.ContentType && true ==
request.Url.AbsolutePath.EndsWith(".aspx"))
{
response.Filter = new OutputCleanupFilter(response.Filter);
}
}
Where OutputCleanupFilter is my class
public class OutputCleanupFilter : Stream
{
.......
public override void Write(Byte[] buffer, Int32 offset, Int32 count)
{
}
........
}
In that function Write i do link changes in html code.
So the problem is I GOT PAGE BY PARTS. So that fuction got buffer few times
and each time if have near 30% of page and if in that place link cuted by
half i can't parse it. So exist any way to froce send in buffer all page at
the same time?
and there i add response.Filter for my pages.
public void Init(HttpApplication application)
{
application.ReleaseRequestState += new
EventHandler(InstallResponseFilter);
}
private void InstallResponseFilter(object sender, EventArgs e)
{
HttpResponse response = HttpContext.Current.Response;
HttpRequest request = HttpContext.Current.Request;
if ("text/html" == response.ContentType && true ==
request.Url.AbsolutePath.EndsWith(".aspx"))
{
response.Filter = new OutputCleanupFilter(response.Filter);
}
}
Where OutputCleanupFilter is my class
public class OutputCleanupFilter : Stream
{
.......
public override void Write(Byte[] buffer, Int32 offset, Int32 count)
{
}
........
}
In that function Write i do link changes in html code.
So the problem is I GOT PAGE BY PARTS. So that fuction got buffer few times
and each time if have near 30% of page and if in that place link cuted by
half i can't parse it. So exist any way to froce send in buffer all page at
the same time?