Dealing with objects using custom HttpModule

2 posts, 0 answers
  1. Casper
    Casper avatar
    4 posts
    Member since:
    Feb 2009

    Posted 02 Mar 2009 Link to this post

    Hi,

    I have been trying the "Best Practices in web development with OpenAccess" sample (found here) but it makes my page fail totally. It can't load either the theme or the asp.net ajax.

    The only thing I have done, is copying the ScopeModule into my project at changed the Namespaces.

    When running in debug it fails in line 47: IObjectScope scope = (IObjectScope)HttpContext.Current.Session[SCOPE_KEY]; (The method CreateTransaction())

    This causes the JavaScript error: ASP.NET Ajax client-side framework failed to load.

    When I remove the HttpModule from my web.config, theme and ajax is working just fine.

    I'm using VS2008 SP1 with .net 3.5 and the latest OpenAccess ORM EXPRESS.

    What am I doing wrong?
  2. Zoran
    Admin
    Zoran avatar
    534 posts

    Posted 06 Mar 2009 Link to this post

    Hello Casper,

    Thank you for the report. The reason for this behavior is that the rich AJAX controls fire the "PreRequestHandlerExecute" event multiple times while the controls are rendered and to be able to use this approach the HttpModule should pass significant improvement. However the focus of this example was to demonstrate basic usage of OpenAccess and HttpModule in the best possible way. In order to deliver a working example we replaced the current one with another where the standard ASP.NET controls are used.

    Please do not hesitate to contact us regarding any other similar issues.


    Kind regards,
    Zoran
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft banner
Back to Top