[Mono-devel-list] httpModules

Phillip Hitchcock phitchcock at xtra.co.nz
Sun Oct 17 23:43:07 EDT 2004

Hi i'm trying to impliment a intercept filter in c#

i'm implimenting the IHttpModule interface and have gotten it to compile

using System;
using System.Web;
using System.Diagnostics;

namespace Eclectic.Test
        public class HttpFilter : IHttpModule
                public void Init(HttpApplication context)
                        Console.WriteLine("Hellow World!");

                public void Dispose()


as you can see pretty basic... just wanting to prove it works.

i have put this in a web.config file int he application root

                <add name="HttpFilter" type="Eclectic.Test.HttpFilter, Eclectic.Test" />

and it seems to be working because i get the following error
System.TypeLoadException: Cannot load type 'Eclectic.Test.HttpFilter, Eclectic.Test'
in (unmanaged) (wrapper managed-to-native) System.Type:internal_from_name (string,bool,bool)
in <0x00004> (wrapper managed-to-native) System.Type:internal_from_name (string,bool,bool)
in <0x00053> System.Type:GetType (string,bool)
in <0x0002c> System.Web.Configuration.ModuleItem:.ctor (string,string)
in <0x002e5> System.Web.Configuration.HttpModulesConfigurationHandler:Create (object,object,System.Xml.XmlNode)
in <0x001a5> System.Web.Configuration.ConfigurationData:GetConfigInternal (string,System.Web.HttpContext,bool)
in <0x00092> System.Web.Configuration.ConfigurationData:GetConfigOptLocation (string,System.Web.HttpContext,bool)
in <0x002e7> System.Web.Configuration.ConfigurationData:GetConfig (string,System.Web.HttpContext)
in <0x00079> System.Web.Configuration.WebDefaultConfig:GetConfig (string,System.Web.HttpContext)
in <0x00030> System.Web.Configuration.WebDefaultConfig:GetConfig (string)
in <0x00016> System.Web.Configuration.WebConfigurationSettings:GetConfig (string)
in <0x0000b> System.Web.HttpContext:GetAppConfig (string)
in <0x00025> System.Web.HttpApplication:InitModules ()
in <0x00054> System.Web.HttpApplication:Startup (System.Web.HttpContext,System.Web.HttpApplicationState)
in <0x0007c> System.Web.HttpApplicationFactory:InitializeFactory (System.Web.HttpContext)
in <0x0007a> System.Web.HttpApplicationFactory:GetInstance (System.Web.HttpContext)
in <0x00132> System.Web.HttpRuntime:InternalExecuteRequest (System.Web.HttpWorkerRequest)so now the question is what is the file spose to be called and where is it suspose to be located, from what i have been able to work out i have called the file Eclectic.Test.dll and placed it in the bin dit of the application root.

i have also tried putting it in /usr/lib/mono/1.0/

both just produce the above error

any suggestions would be greatly appreciated

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20041018/711611a7/attachment.html 

More information about the Mono-devel-list mailing list