[CLOSED] Error on deploying an MVC app

  1. #1

    [CLOSED] Error on deploying an MVC app

    Hi,

    I'm working on an MVC2 application that, using the development environment (Visual Studio 2010), works correctly (I'm using .NET framework 3.5SP1).

    I published the application on the same machine (OS Windows 7 ), but when I try to access the application, I get the attached error.

    Could you help me?

    Thanks,
    Stefano
    Last edited by geoffrey.mcgill; Jul 19, 2010 at 10:21 PM.
  2. #2
    Hi,

    Why do you think that problem is related with Ext.Net toolkit?
    May be problem related with IIS? What IIS is used on development enviroment? Windows7 uses IIS7
  3. #3
    Hi,

    in the development environment i'm using IIS7 (how you can see in the error message).
    The question is why using the visual studio web server it works correctly and publishing the application into the same machine the application desn't work.
    I don' t know really if the problem is related to the Ext.net toolikit.

    Bye,
    Stefano
  4. #4
    Hi,

    Are you sure that publish process copied all required files? Please investigate published folder
  5. #5
    Hi,

    yes, files are all there.
    It seems a routing problem.

    Bye,
    Stefano
  6. #6
    Is this still an issue? If no, what change was required to solve problem.
    Geoffrey McGill
    Founder
  7. #7
    Hi Geoff, Am also getting same error 404 Error when deploying MVC 2 app using ext.Net Toolkit on IIS 7.
    Any solution to this? Works fine in Vs2010 but fails when deploying to IIS7

    My Web config file is like this

    <?xml version="1.0" encoding="UTF-8"?>
    
    <!--
      For more information on how to configure your ASP.NET application, please visit
      http://go.microsoft.com/fwlink/?LinkId=152368
      -->
    
    <configuration>
    
      <system.web>
        <customErrors mode="Off"/>
    
        <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>
    
       
    	<authorization>
          <deny users="?" />
        </authorization>
    	
        <authentication mode="Forms">
          <forms loginUrl="~/Account/Login/" />
        </authentication>
        
        <httpRuntime requestValidationMode="2.0" />
        
        <pages validateRequest="false">
          <namespaces>
            <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.Linq" />
            <add namespace="System.Collections.Generic" />
          </namespaces>
    
        </pages>
    
        <httpHandlers>
    			<add path="*.mvc" verb="*" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
    		</httpHandlers>
    		<httpModules>
    			<add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net"/>
    		</httpModules>
    
      </system.web>
    
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <modules runAllManagedModulesForAllRequests="true" />
            <httpRedirect enabled="false" destination="" />
    
      </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>
    Last edited by webppl; Oct 15, 2010 at 4:58 AM.
  8. #8
    Hi,

    IIS7 uses 'system.webServer' section instead 'system.web' therefore http handlers and http modules must be defined inside that section
    <system.webServer>
    		<validation validateIntegratedModeConfiguration="false" />
    		<modules>
    			<remove name="ScriptModule" />
    			<add 
                    name="ScriptModule" 
                    preCondition="managedHandler" 
                    type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" 
                    />
                <add 
                    name="DirectRequestModule" 
                    preCondition="managedHandler" 
                    type="Ext.Net.DirectRequestModule, Ext.Net"
                    />
            </modules>
    		<handlers>
    			<add 
                    name="ScriptHandlerFactoryAppServices" 
                    verb="*" 
                    path="*_AppService.axd" 
                    preCondition="integratedMode" 
                    type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" 
                    />
                <add 
                    name="DirectRequestHandler" 
                    verb="*" 
                    path="*/ext.axd" 
                    preCondition="integratedMode" 
                    type="Ext.Net.ResourceHandler"
                    />
            </handlers>
        </system.webServer>
  9. #9
    Thanks for your quick reply Vladimir, but still its not working

    <?xml version="1.0" encoding="UTF-8"?>
    
    <!--
      For more information on how to configure your ASP.NET application, please visit
      http://go.microsoft.com/fwlink/?LinkId=152368
      -->
    
    <configuration>
    
      <configSections>
        <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
        </sectionGroup>
      </configSections>
      
      <system.web>
        <customErrors mode="Off" />
    
        <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>
    
       
    	<authorization>
          <deny users="?" />
        </authorization>
    	
        <authentication mode="Forms">
          <forms loginUrl="~/Account/Login/" />
        </authentication>
        
        <httpRuntime requestValidationMode="2.0" />
        
        <pages validateRequest="false">
          <namespaces>
            <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.Linq" />
            <add namespace="System.Collections.Generic" />
          </namespaces>
    
        </pages>
    
        <httpHandlers>
    			<add path="*.mvc" verb="*" type="System.Web.Mvc.MvcHttpHandler, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
    		</httpHandlers>
    		<httpModules>
    			<add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net" />
    		</httpModules>
    
      </system.web>
    
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <modules runAllManagedModulesForAllRequests="true" >
    	
    		 <remove name="ScriptModule" />
    	     <add 
    		    name="DirectRequestModule" 
    			preCondition="managedHandler" 
    			type="Ext.Net.DirectRequestModule, Ext.Net"/>         
    		 <add 
    		     name="ScriptModule" 
    			 preCondition="managedHandler" 
    			 type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />             
    		   
    	</modules>
        <httpRedirect enabled="false" destination="" />
    	<handlers>             
    		 <add 
    			name="ScriptHandlerFactoryAppServices" 
    			verb="*" 
    			path="*_AppService.axd" 
    			preCondition="integratedMode" 
    			type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>            
    		 <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>

Similar Threads

  1. Replies: 3
    Last Post: Jul 20, 2012, 3:19 PM
  2. Replies: 17
    Last Post: Oct 12, 2011, 4:54 PM
  3. Replies: 4
    Last Post: Jan 25, 2011, 10:39 AM
  4. Problem in deploying the project
    By OSSAGHO in forum 1.x Help
    Replies: 2
    Last Post: Sep 09, 2010, 4:54 AM
  5. Replies: 2
    Last Post: Jul 29, 2009, 1:57 PM

Posting Permissions