1-我有一個類結構,如下所示。HttpModules配置錯誤
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()
{
}
}
}
我使用類似的東西在所有這些頁面中使用上面的代碼。
<httpModules>
<add name="ViewStateSeoModule" type="ViewStateSeoModule" />
</httpModules>
但是,我得到了配置錯誤。
Parser Error: Could not load type 'ViewStateSeoModule'. (C:\Users\xxx\Documents\Visual Studio 2010\WebSites\xxx\web.config line 78) Line 78:
在此先感謝。