locked
HttpModule and the Visual Studio 2005 Web Application Project RRS feed

  • Question

  • User12413809 posted
    Hi all!

    I'm having problem with a HttpModule and the new (or old if you like) Visual Studio 2005 Web Application Project type. The HttpModule is implemeted in another assembly (another project included in the solution) and since there is no bin folder (in the same way) as there is in the regular web project type I thought that setting a reference to that assembly would do the trick but it didn't. The HttpModule is registred in the web.config as well. I'm using the local web server and not IIS.

    [snippet] 

    1    namespace Henriksson.TheLab.Persistence
    2    {
    3        public class NHibernateHttpModule : IHttpModule
    4        {
    5            private static readonly string FactoryKey = "NHibernateSessionFactory";
    6            private static readonly string SessionKey = "NHibernateSession";
    7   
    8            protected static ISessionFactory _factory;
    9   
    10           // init the module
    11           public void Init(HttpApplication context)
    12           {
    13               //context.BeginRequest += new EventHandler(context_BeginRequest);
    14               context.EndRequest += new EventHandler(context_EndRequest);
    15           }
    16  
    17           // clean up for module
    18           public void Dispose()
    19           {
    20               if (_factory != null)
    21               {
    22                   _factory.Close();
    23               }
    24           }
    25  

    <httpModules>

    <add name="NHibernateHttpModule" type="Henriksson.TheLab.Persistence.NHibernateHttpModule, Henriksson.TheLab.Persistence" />

    </httpModules>

    Any suggestions?

    Regards!
    Pelle

     

     

     

     
    Thursday, November 2, 2006 9:56 AM

All replies