asp.net - HttpModules Configuration error -
1- have class structure 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 httpapplication; if (application.context.request.url.absolutepath.contains(".aspx")) application.response.filter = new htmlfilterstream(application.response.filter); } public void dispose() { } } }
i'm using using in pages through upper code.
<httpmodules> <add name="viewstateseomodule" type="viewstateseomodule" /> </httpmodules>
but,i got configuration error.
parser error: not load type 'viewstateseomodule'. (c:\users\xxx\documents\visual studio 2010\websites\xxx\web.config line 78) line 78:
thanks in advance.
you have wrapped code in namespace not referred in web.config:
<httpmodules> <add name="viewstateseomodule" type="viewstateseohelper.viewstateseomodule" /> </httpmodules>
Comments
Post a Comment