Jan 20, 2011, 9:02 AM
VS2010 + ASP.NET MVC + Ext.NET
Hi,
We're evaluating Ext.NET before purchase but I'm having real trouble getting Ext.NET to work correctly in an ASP.NET MVC project. Having read the homepage, it seemed to indicate quite clearly this would work with MVC, unless I've misinterpreted what it meant?
My error is the "The web.config file for this project is missing the required DirectRequestModule." message. Following the README.TXT file, I added the web.config entries as shown at the end of this post. Still I get the error. I have a standard ASP.NET MVC solution, created using the template that ships with VS 2010 (with a pre-defined HomeController etc). The only code I've added is to put a ResourceManager and ExtWindow conrol into the Index.aspx file of the Home views folder.
Is there something I'm doing incorrectly?
Cheers,
Peter
We're evaluating Ext.NET before purchase but I'm having real trouble getting Ext.NET to work correctly in an ASP.NET MVC project. Having read the homepage, it seemed to indicate quite clearly this would work with MVC, unless I've misinterpreted what it meant?
My error is the "The web.config file for this project is missing the required DirectRequestModule." message. Following the README.TXT file, I added the web.config entries as shown at the end of this post. Still I get the error. I have a standard ASP.NET MVC solution, created using the template that ships with VS 2010 (with a pre-defined HomeController etc). The only code I've added is to put a ResourceManager and ExtWindow conrol into the Index.aspx file of the Home views folder.
Is there something I'm doing incorrectly?
Cheers,
Peter
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="extnet" type="Ext.Net.GlobalConfig" requirePermission="false" />
</configSections>
<extnet />
<system.web>
<httpHandlers>
<add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
<add path="*/ext.axd" verb="*" type="Ext.Net.ResourceHandler" validate="false" />
</httpHandlers>
<httpModules>
<add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net" />
</httpModules>
<!--
Enabling request validation in view pages would cause validation to occur
after the input has already been processed by the controller. By default
MVC performs request validation before a controller processes the input.
To change this behavior apply the ValidateInputAttribute to a
controller or action.
-->
<pages
validateRequest="false"
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<controls>
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
</controls>
</pages>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules>
<add
name="DirectRequestModule"
preCondition="managedHandler"
type="Ext.Net.DirectRequestModule, Ext.Net"
/>
</modules>
<handlers>
<remove name="BlockViewHandler"/>
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
<add
name="DirectRequestHandler"
verb="*"
path="*/ext.axd"
preCondition="integratedMode"
type="Ext.Net.ResourceHandler"
/>
</handlers>
</system.webServer>
</configuration>