This is a migrated thread and some comments may be shown as answers.

Dealing with objects using custom HttpModule

1 Answer 71 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Casper
Top achievements
Rank 1
Casper asked on 02 Mar 2009, 10:01 PM
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?

1 Answer, 1 is accepted

Sort by
0
Zoran
Telerik team
answered on 06 Mar 2009, 02:01 PM
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.
Tags
Development (API, general questions)
Asked by
Casper
Top achievements
Rank 1
Answers by
Zoran
Telerik team
Share this question
or