.NET 4

  1. #1

    .NET 4

    Have anyone ever try Ext.Net with .NET 4 ? I keep receiving warning "The web.config file for this project is missing the required DirectRequestModule." Any help?
  2. #2
    Please add the following to your Web.config.

    Example

    <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <modules>
            <add name="DirectRequestModule" preCondition="managedHandler" type="Ext.Net.DirectRequestModule, Ext.Net" />
        </modules>
        <handlers>
            <add name="DirectRequestHandler" verb="*" path="*/ext.axd" preCondition="integratedMode" type="Ext.Net.ResourceHandler" />
        </handlers>
    </system.webServer>
    Geoffrey McGill
    Founder
  3. #3
    Quote Originally Posted by geoffrey.mcgill View Post
    Please add the following to your Web.config.

    Example

    <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <modules>
            <add name="DirectRequestModule" preCondition="managedHandler" type="Ext.Net.DirectRequestModule, Ext.Net" />
        </modules>
        <handlers>
            <add name="DirectRequestHandler" verb="*" path="*/ext.axd" preCondition="integratedMode" type="Ext.Net.ResourceHandler" />
        </handlers>
    </system.webServer>
    Thanks for quick reply.
    I done that. But now I got a blank page. No error, no warning. Just blank.

    Here is my web.config:

    <?xml version="1.0"?>
    
    <!--
      For more information on how to configure your ASP.NET application, please visit
      http://go.microsoft.com/fwlink/?LinkId=152368
      -->
    
    <configuration>
    	<configSections>
    		<section name="extnet" type="Ext.Net.GlobalConfig" requirePermission="false" />
    	</configSections>
    
    	<extnet theme="Gray" />
    
    	<system.web>
    		<httpHandlers>
    			<add path="*/ext.axd" verb="*" type="Ext.Net.ResourceHandler" validate="false" />
    		</httpHandlers>
    		<httpModules>
    			<add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net" />
    		</httpModules>
    		
        <compilation debug="true" targetFramework="4.0">
          <assemblies>
            <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            <add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
          </assemblies>
        </compilation>
    
        <pages>
          <namespaces>
            <add namespace="System.Web.Mvc" />
            <add namespace="System.Web.Mvc.Ajax" />
            <add namespace="System.Web.Mvc.Html" />
            <add namespace="System.Web.Routing" />
          </namespaces>
        </pages>
      </system.web>
    
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
        <modules runAllManagedModulesForAllRequests="true"/>
    		<modules>
    			<add name="DirectRequestModule" preCondition="managedHandler" type="Ext.Net.DirectRequestModule, Ext.Net" />
    		</modules>
    		<handlers>
    			<add name="DirectRequestHandler" verb="*" path="*/ext.axd" preCondition="integratedMode" type="Ext.Net.ResourceHandler" />
    		</handlers>
    	</system.webServer>
    	
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
    </configuration>
    And here is Site.Master:

    <%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Title</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <ext:ResourcePlaceHolder ID="ResourcePlaceHolder1" runat="server" Mode="Script" />
        <ext:ResourcePlaceHolder ID="ResourcePlaceHolder2" runat="server" Mode="Style" />
        <link rel="stylesheet" type="text/css" href="/resources/css/ui.css" />
        <script type="text/javascript" src="/resources/js/site.js"></script>
    </head>
    
    <body>
        <ext:ResourceManager 
            ID="ResourceManager1" 
            runat="server" 
            InitScriptMode="Linked" 
            DirectMethodNamespace="X"
            IDMode="Explicit"
            />				    
        
    		<ext:Viewport ID="mainViewport" runat="server" Layout="border">
    			<Items>
    				<ext:Panel ID="headerPanel" runat="server" Region="North">
    					<Items>
    						<ext:Label ID="headerLabel" runat="server" Text="Header" />
    					</Items>
    				</ext:Panel>
    				<ext:Panel ID="westPanel" runat="server" Region="West" Width="250" Collapsible="true" Split="true">
    					<Items>
    						<ext:Label ID="menuLabel" runat="server" Text="Menu" />
    					</Items>
    				</ext:Panel>
    				<ext:Panel ID="contentPanel" runat="server" Region="Center">
    					<Items>
    						<ext:Label ID="contentLabel" runat="server" Text="Content" />
    					</Items>
    				</ext:Panel>
    			</Items>
    		</ext:Viewport>
        
    </body>
    </html>
    Correct me, please
    Last edited by geoffrey.mcgill; Nov 24, 2010 at 6:33 PM. Reason: please use [CODE] tags
  4. #4
    In future posts, please wrap your code samples in [CODE] tags.

    The following forum post should be reviewed, see

    http://forums.ext.net/showthread.php...ing-New-Topics
    Geoffrey McGill
    Founder
  5. #5
    Quote Originally Posted by geoffrey.mcgill View Post
    In future posts, please wrap your code samples in [CODE] tags.

    The following forum post should be reviewed, see

    http://forums.ext.net/showthread.php...ing-New-Topics
    Sorry, missed that. :( I'm new and I'm so amazed by the examples.
    I'll wrap my sample code in the tag in future posts.
    So what's wrong with the sample code?
  6. #6
    Hi,

    I am not sure if that helped but your system.webServer section has two 'modules' elements. I guess it is incorrect
    Try the following web.config
    http://forums.ext.net/showthread.php...ll=1#post44474
  7. #7
    Hi,

    I copy/paste your sample web.config and .aspx into a brand new ASP.NET 4.0 website project and everything renders correctly.
    Geoffrey McGill
    Founder
  8. #8
    Quote Originally Posted by geoffrey.mcgill View Post
    Hi,

    I copy/paste your sample web.config and .aspx into a brand new ASP.NET 4.0 website project and everything renders correctly.

    aspx? But it's a site.master.
    I'll check again. May be I messed up with other codes.

    Thanks for your reply. Thanks for Vladimir too.

Tags for this Thread

Posting Permissions