namespace ViewStateSeoHelper
{
class ViewStateSeoModule : IHttpModule
{
public void Init(HttpApplication context)
{
context.BeginRequest += new EventHandler(context_BeginRequest);
}
void context_BeginRequest(object sender, EventArgs e)
{
HttpApplication application = sender as HttpApplication;
if (application.Context.Request.Url.AbsolutePath.Contains(".aspx"))
application.Response.Filter = new HtmlFilterStream(application.Response.Filter);
}
public void Dispose()
{
}
}
}
I'm using something like this to using in all those pages through upper code.
Parser Error: Could not load type 'ViewStateSeoModule'.
(C:\Users\xxx\Documents\Visual Studio 2010\WebSites\xxx\web.config line 78)
Line 78: <add name="ViewStateSeoModule" type="ViewStateSeoModule" />
ssadoglu
Member
4 Points
14 Posts
HttpModules Configuration error
Jul 22, 2011 07:30 PM|LINK
Hi Folks,
1- I have a class structure as shown below.
namespace ViewStateSeoHelper { class ViewStateSeoModule : IHttpModule { public void Init(HttpApplication context) { context.BeginRequest += new EventHandler(context_BeginRequest); } void context_BeginRequest(object sender, EventArgs e) { HttpApplication application = sender as HttpApplication; if (application.Context.Request.Url.AbsolutePath.Contains(".aspx")) application.Response.Filter = new HtmlFilterStream(application.Response.Filter); } public void Dispose() { } } } I'm using something like this to using in all those pages through upper code.