[CLOSED] Parser error in runtime

  1. #1

    [CLOSED] Parser error in runtime

    Hi,

    After deploying a test application to a web server, I receive a parser runtime error complaining about missing System.Web.Mvc assemblies. The project isn't supposed to rely on MVC related components although apparently its dependencies are somehow present. Could you point me out which assembly may depend on it? Let me know if you need more information.

    Web.config
    <?xml version="1.0"?>
    <configuration>
      <configSections>
        <section name="extnet" type="Ext.Net.GlobalConfig" requirePermission="false"/>
      </configSections>
      <extnet theme="Default" initScriptMode="Linked"/>
      <system.web>
        <httpRuntime targetFramework="4.5"/>
        <compilation debug="true" targetFramework="4.5"/>
        <customErrors mode="Off">
          <error statusCode="404" redirect="~/404.aspx"/>
        </customErrors>
        <authentication mode="Windows"/>
        <authorization>
          <allow users="*"/>
          <deny users="?"/>
        </authorization>
        <httpHandlers>
          <add path="*/ext.axd" verb="*" type="Ext.Net.ResourceHandler" validate="false"/>
        </httpHandlers>
        <httpModules>
          <add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net"/>
        </httpModules>
        <pages autoEventWireup="true" enableSessionState="true" enableViewState="false" enableViewStateMac="false" smartNavigation="true" validateRequest="false" controlRenderingCompatibilityVersion="4.0">
          <controls>
            <add assembly="Ext.Net" namespace="Ext.Net" tagPrefix="ext"/>
          </controls>
        </pages>
        <sessionState timeout="60"/>
      </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>
        <handlers>
          <add name="DirectRequestHandler" verb="*" path="*/ext.axd" preCondition="integratedMode" type="Ext.Net.ResourceHandler"/>
        </handlers>
        <security>
          <requestFiltering>
            <requestLimits maxAllowedContentLength="30000000"/>
          </requestFiltering>
        </security>
      </system.webServer>
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed"/>
            <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="Ext.Net.Utilities" publicKeyToken="2c34ac34702a3c23"/>
            <bindingRedirect oldVersion="0.0.0.0-2.5.0" newVersion="2.5.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="Transformer.NET" publicKeyToken="e274d618e7c603a7"/>
            <bindingRedirect oldVersion="0.0.0.0-2.1.1" newVersion="2.1.1"/>
          </dependentAssembly>
          <!--<dependentAssembly>
            <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/>
            <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
            <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
          </dependentAssembly>-->
        </assemblyBinding>
      </runtime>
    </configuration>
    Click image for larger version. 

Name:	03-09-2015 8-29-21 AM.png 
Views:	25 
Size:	12.6 KB 
ID:	24201

    Click image for larger version. 

Name:	03-09-2015 8-30-10 AM.png 
Views:	31 
Size:	57.0 KB 
ID:	24202
    Last edited by fabricio.murta; Sep 03, 2015 at 6:37 PM. Reason: [CLOSED]
  2. #2
    I ended up getting ASP.Net MVC NuGet package installed for the project in question and that solved the issue. Apparently, MVC assemblies are required to be referenced and available for Ext.Net framework to operate properly even in WebForms model. You may mark this question as resolved.

    <?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=169433
      -->
    <configuration>
      <configSections>
        <section name="extnet" type="Ext.Net.GlobalConfig" requirePermission="false" />
      </configSections>
      <extnet theme="Default" initScriptMode="Linked" />
      <!--
        For a description of web.config changes for .NET 4.5 see http://go.microsoft.com/fwlink/?LinkId=235367.
    
        The following attributes can be set on the <httpRuntime> tag.
          <system.Web>
            <httpRuntime targetFramework="4.5" />
          </system.Web>
      -->
      <system.web>
        <httpRuntime targetFramework="4.5" />
        <compilation debug="true" targetFramework="4.5" />
        <customErrors mode="Off">
          <error statusCode="404" redirect="~/404.aspx" />
        </customErrors>
        <authentication mode="Windows" />
        <authorization>
          <allow users="*" />
          <deny users="?" />
        </authorization>
        <httpHandlers>
          <add path="*/ext.axd" verb="*" type="Ext.Net.ResourceHandler" validate="false" />
        </httpHandlers>
        <httpModules>
          <add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net" />
        </httpModules>
        <pages autoEventWireup="true" enableSessionState="true" enableViewState="false" enableViewStateMac="false" smartNavigation="true" validateRequest="false" controlRenderingCompatibilityVersion="4.0">
          <controls>
            <add assembly="Ext.Net" namespace="Ext.Net" tagPrefix="ext" />
          </controls>
        </pages>
        <sessionState timeout="60" />
      </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>
        <handlers>
          <add name="DirectRequestHandler" verb="*" path="*/ext.axd" preCondition="integratedMode" type="Ext.Net.ResourceHandler" />
        </handlers>
        <security>
          <requestFiltering>
            <requestLimits maxAllowedContentLength="30000000" />
          </requestFiltering>
        </security>
      </system.webServer>
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" />
            <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="Ext.Net.Utilities" publicKeyToken="2c34ac34702a3c23" />
            <bindingRedirect oldVersion="0.0.0.0-2.5.0" newVersion="2.5.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="Transformer.NET" publicKeyToken="e274d618e7c603a7"/>
            <bindingRedirect oldVersion="0.0.0.0-2.1.1" newVersion="2.1.1"/>
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
    </configuration>
  3. #3
    Hello @vadym.f,

    We have several NuGet Packages, destined to different MVC configurations. You must choose the one corresponding to the MVC version (green in the picture below) or abscence (yellow).
    Click image for larger version. 

Name:	60031-nuGetPackages.png 
Views:	24 
Size:	16.5 KB 
ID:	24204

    Glad you could resolve the issue by yourself, though. :)
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 1
    Last Post: Sep 22, 2012, 8:08 PM
  2. Replies: 1
    Last Post: Sep 13, 2012, 6:38 PM
  3. [CLOSED] Infinite Scrolling throwing Parser Error
    By rnachman in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Sep 03, 2012, 5:19 PM
  4. Replies: 2
    Last Post: May 08, 2012, 3:34 PM
  5. Replies: 2
    Last Post: Sep 15, 2010, 8:38 AM

Posting Permissions