[CLOSED] IIS7 deployment

  1. #1

    [CLOSED] IIS7 deployment

    hi all,

    we deploy an update for our site using a new EXT dll updated from SVN , it was working fine at local and online before the update , after the update the webresource.axd return 404 (i monitor it using fiddler ) and ext returns ext is undefined.

    your urgent help really appreciated.
    Last edited by Daniil; Apr 09, 2011 at 12:52 PM. Reason: [CLOSED]
  2. #2
    Hi,

    IIS7 uses another section in the web.config (<system.webServer>)
    You have to register Ext.Net http module and handler in that section
    Please see readme.txt from Ext.Net distributive and web.config example from Examples.Ext.Net project
  3. #3
    I'm refered from @daniil to this forum to here.

    I'm reade the documentation, but don't understand very good the changes. I'm adding the files, can take a lock and help me to see the failure?

    Web.config file:
    <?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>
    
      <appSettings>
        <add key="webpages:Version" value="1.0.0.0"/>
        <add key="ClientValidationEnabled" value="true"/>
        <add key="UnobtrusiveJavaScriptEnabled" value="true"/>
      </appSettings>
        
      <system.web>
        <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.Helpers, Version=1.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=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            <add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
          </assemblies>
        </compilation>
    
        <authentication mode="Forms">
          <forms loginUrl="~/Account/LogOn" timeout="2880" />
        </authentication>
    
        <pages>
          <namespaces>
            <add namespace="System.Web.Helpers" />
            <add namespace="System.Web.Mvc" />
            <add namespace="System.Web.Mvc.Ajax" />
            <add namespace="System.Web.Mvc.Html" />
            <add namespace="System.Web.Routing" />
            <add namespace="System.Web.WebPages"/>
          </namespaces>
        </pages>
    
        <httpModules>
          <add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net" />
        </httpModules>
    
      </system.web>
    
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
        <modules runAllManagedModulesForAllRequests="true"/>
    
        <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>
    
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
    </configuration>
    Global.asax.cs File:
    using System;
    using System.Collections.Generic;
    using System.Threading;
    using System.Globalization;
    using System.Linq;
    using System.Web;
    using System.Web.Mvc;
    using System.Web.Routing;
    
    namespace SRT.Sitio
    {
        // Note: For instructions on enabling IIS6 or IIS7 classic mode, 
        // visit http://go.microsoft.com/?LinkId=9394801
    
        public class AplicacionSRT : System.Web.HttpApplication
        {
            public static void RegisterGlobalFilters(GlobalFilterCollection filters)
            {
                filters.Add(new HandleErrorAttribute());
            }
    
            public static void RegisterRoutes(RouteCollection routes)
            {
                routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
    
                routes.MapRoute(
                   "ConjuntosMensajes", // Route name
                   "{controller}/{action}/{id}/{descripcion}", // URL with parameters
                   new { controller = "ConjuntosMensajes", action = "OperacionConjunto", id = UrlParameter.Optional, descripcion = UrlParameter.Optional } // Parameter defaults
                );
    
                routes.MapRoute(
                   "Default" , // Route name
                   "{controller}/{action}/{id}" , // URL with parameters
                   new { controller = "Home" , action = "Index" , id = UrlParameter.Optional } // Parameter defaults
                );
    
                routes.MapRoute (
                  "AtributosMensajes" , // Route name
                  "{controller}/{action}/{conjunto}/{mensaje}" , // URL with parameters
                  new { controller = "AtributosMensajes" , action = "ListaAtributosMensajes" , conjunto = UrlParameter.Optional , mensaje = UrlParameter.Optional } // Parameter defaults
                );
    
                routes.MapRoute (
                    "DinamicasTransaccionales" , // Route name
                    "{controller}/{action}/{codigo}/{data}/{codigoDinamica}" , // URL with parameters
                    new { controller = "DinamicasTransaccionales" , action = "EditorPaso" , codigo = UrlParameter.Optional , data = UrlParameter.Optional , codigoDinamica = UrlParameter.Optional } // Parameter defaults
                );
            }
    
            protected void Application_Start()
            {
                AreaRegistration.RegisterAllAreas();
    
                RegisterGlobalFilters(GlobalFilters.Filters);
                RegisterRoutes(RouteTable.Routes);
            }
    
            protected void Application_BeginRequest(Object sender, EventArgs e)
            {
    
                if (Request.UserLanguages != null)
                {
                    try
                    {
                        //Thread.CurrentThread.CurrentCulture = new CultureInfo(/*"es-CO"*/"en-US", false);
                        //Thread.CurrentThread.CurrentUICulture = new CultureInfo(/*"es-CO"*/"en-US", false);
                        Thread.CurrentThread.CurrentCulture = new CultureInfo(Request.UserLanguages[0], false);
                        Thread.CurrentThread.CurrentUICulture = new CultureInfo( Request.UserLanguages[0], false);
                    }
                    catch
                    {
                        Thread.CurrentThread.CurrentCulture = new CultureInfo("es-CO", false);
                    }
                }
            }
        }
    }
    Thanks!
    Last edited by inaltec; Jan 26, 2012 at 3:14 PM. Reason: some language mistakes
  4. #4
    I found the answer on this post

    Now I'm changin all the URL, from this:

    <DirectEvents>
    <Click Url="/Auth/LogOut">
    </Click>
    </DirectEvents>
    To this:

    <DirectEvents>
    <Click Url="~/Auth/LogOut">
    </Click>
    </DirectEvents>
  5. #5
    Hi,

    I've reviewed a few threads on how to publish the Ext.Net.Mvc.Demo application and run it under IIS. As it is, the version 1 example throws 404 error after login is performed because the Urls aren't resolved correctly. Could you advise how to fix the problem?

Similar Threads

  1. Deployment issue
    By Sergio Majocchi in forum 1.x Help
    Replies: 2
    Last Post: Feb 08, 2012, 4:50 AM
  2. [CLOSED] EXT is not defined on IIS deployment
    By CMA in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jan 14, 2011, 10:30 AM
  3. Coolite MVC Deployment
    By Mike in forum 1.x Help
    Replies: 4
    Last Post: Oct 20, 2009, 10:17 PM
  4. Deployment problem
    By romeox in forum 1.x Help
    Replies: 0
    Last Post: Jan 20, 2009, 4:17 AM
  5. [CLOSED] Coolite Deployment
    By r_honey in forum 1.x Help
    Replies: 4
    Last Post: Dec 13, 2008, 10:26 AM

Posting Permissions