1

I have a web service that works fine when I run locally, I already installed the service in a server for some test and it works, but when I installed it in other server, all request trow the next error:

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
   <s:Header>
      <a:Action s:mustUnderstand="1">http://tempuri.org/IWSRiesgoLiquidez/consultaIngresosEgresosPuntosDeAtencionResponse</a:Action>
   </s:Header>
   <s:Body>
      <consultaIngresosEgresosPuntosDeAtencionResponse xmlns="http://tempuri.org/">
         <consultaIngresosEgresosPuntosDeAtencionResult xmlns:b="http://schemas.datacontract.org/2004/07/Mvm.SATWeb.Domain" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <b:CODIGORED i:nil="true"/>
            <b:DESCRIPCIONESTADO>Error creating context 'spring.root': Could not load file or assembly 'antlr.runtime, Version=2.7.6.2, Culture=neutral, PublicKeyToken=65e474d141e25e07' or one of its dependencies. The system cannot find the file specified.</b:DESCRIPCIONESTADO>
            <b:ESTADO>FALLIDO</b:ESTADO>
            <b:FECHA i:nil="true"/>
            <b:listaPuntosDeAtencion i:nil="true"/>
         </consultaIngresosEgresosPuntosDeAtencionResult>
      </consultaIngresosEgresosPuntosDeAtencionResponse>
   </s:Body>
</s:Envelope>

This is the request

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/">
   <soap:Header/>
   <soap:Body>
      <tem:consultaIngresosEgresosPuntosDeAtencion>
         <!--Optional:-->
         <tem:USUARIO>?</tem:USUARIO>
         <!--Optional:-->
         <tem:CLAVE>?</tem:CLAVE>
         <!--Optional:-->
         <tem:CODIGORED>?</tem:CODIGORED>
         <!--Optional:-->
         <tem:FECHA>?</tem:FECHA>
         <!--Optional:-->
         <tem:HORAINICIAL>?</tem:HORAINICIAL>
         <!--Optional:-->
         <tem:HORAFINAL>?</tem:HORAFINAL>
      </tem:consultaIngresosEgresosPuntosDeAtencion>
   </soap:Body>
</soap:Envelope>

The specific error

Error creating context 'spring.root': Could not load file or assembly 'antlr.runtime, Version=2.7.6.2, Culture=neutral, PublicKeyToken=65e474d141e25e07' or one of its dependencies. The system cannot find the file specified

The web.config of the web Service bellow

<?xml version="1.0" encoding="UTF-8"?>
<!--
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
    \Windows\Microsoft.Net\Framework\v2.x\Config 
-->
<configuration>
  <configSections>
    <!--Las configuaciones que existen en Web.config de SATWebServices Bernardino-->
    <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data" />


    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
      <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
        <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
        <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
          <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
          <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
          <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
          <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
        </sectionGroup>
      </sectionGroup>
    </sectionGroup>

    <sectionGroup name="spring">
      <section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core" />
      <section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core" />
    </sectionGroup>

  </configSections>
  <!-- Configuración de spring con los servicios Web -->


  <spring>
    <context>
       Servicios de seguridad, logging, multilenguaje, etc. 
      <resource uri="~/Servicios/Infraestructura.config" />
       La declaracion de los servicios de negocio (Los BO) 
      <resource uri="~/Servicios/ServiciosNegocio.config" />
    </context>
  </spring>


  <dataConfiguration defaultDatabase="BDSATWeb" />
  <connectionStrings>
    <!--<add name="BDSATWeb" connectionString="Data Source=192.168.60.3\sat;Initial Catalog=satwebpruebas;User ID=SAT;Password=sat" providerName="System.Data.SqlClient"/>-->
    <!--<add name="BDSATWeb" connectionString="Data Source=MVMOAN911A;Initial Catalog=BDSatWebIterIII;User ID=IUSR_SAT;Password=IUSR_SAT" providerName="System.Data.SqlClient"/>-->
    <!--<add name="BDSATWeb" connectionString="Data Source=r8a-app\sat;Initial Catalog=dssatweb;User ID=sat;Password=sat" providerName="System.Data.SqlClient"/>-->
    <add name="BDSATWeb" connectionString="Data Source=R8A-APP\PAS;Initial Catalog=satwebpruebas;User ID=sat;Password=sat;Timeout=240;" providerName="System.Data.SqlClient" />
    <!--<add name="BDSATWeb" connectionString="Data Source=MVMSW905;Initial Catalog=BDSatWebDesarrollo;User ID=IUSR_SAT;Password=IUSR_SAT;Timeout=240;" providerName="System.Data.SqlClient" />-->
    <!--<add name="BDSATWeb" connectionString="Data Source=MVMSW905;Initial Catalog=BDSatWebDesarrollo;User ID=IUSR_SAT;Password=IUSR_SAT;Timeout=240;" providerName="System.Data.SqlClient" />-->
    <!--<add name="BDSATWeb" connectionString="Data Source=MVMSW905;Initial Catalog=BDSatWebProduccion;User ID=IUSR_SAT;Password=IUSR_SAT;Timeout=240;" providerName="System.Data.SqlClient" />-->
    <!--<add name="BDSATWeb" connectionString="Data Source=192.168.60.5;Initial Catalog=satwebpruebas;User ID=sat;Password=sat;Timeout=240;" providerName="System.Data.SqlClient" />-->
  </connectionStrings>
  <appSettings>
    <!--<add key="IdUsuarioOnLine" value="509" />
    <add key="UsuarioOnLine" value="online" />
    <add key="IdAgenciaOnLine" value="074" />
    <add key="IdTipoConexion" value="012" />-->


  </appSettings>

  <system.web>
    <!--
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
        -->
    <compilation debug="true">
      <assemblies>
        <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      </assemblies>
    </compilation>
    <!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->
    <authentication mode="Windows" />
    <!--
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
    <pages>
      <controls>
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      </controls>
    </pages>
    <httpHandlers>
      <remove verb="*" path="*.asmx" />
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
    </httpHandlers>
    <httpModules>
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </httpModules>
  </system.web>
  <system.codedom>
    <compilers>
      <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
        <providerOption name="CompilerVersion" value="v3.5" />
        <providerOption name="WarnAsError" value="false" />
      </compiler>
    </compilers>
  </system.codedom>
  <!--
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
    -->
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules>
      <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </modules>
    <handlers>
      <remove name="WebServiceHandlerFactory-Integrated" />
      <!--<add name="svc-ISAPI-2.0" path="*.svc" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness32" />-->
      <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      <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="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </handlers>
  </system.webServer>

  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="IncreasedTimeout"
                 sendTimeout="00:25:00">
        </binding>
      </basicHttpBinding>
      <wsHttpBinding>
        <binding name="MyBasicHttpBinding">
          <security mode="None">
            <transport clientCredentialType="None" />
            <message establishSecurityContext="False"/>
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>

    <services>
      <service behaviorConfiguration="Mvm.SATWeb.ServicesLiquidez.Service.WSRiesgoLiquidezBehavior"
               name="Mvm.SATWeb.ServicesLiquidez.Service.WSRiesgoLiquidez">
        <endpoint address="http://190.143.64.183:8081/SattServiceLiquidez/Service/WSRiesgoLiquidez.svc" binding="wsHttpBinding"
                bindingConfiguration="MyBasicHttpBinding"
                contract="Mvm.SATWeb.ServicesLiquidez.Service.IWSRiesgoLiquidez">
          <identity>
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
      </service>

    </services>

    <behaviors>

      <serviceBehaviors>
        <behavior name="Mvm.SATWeb.ServicesLiquidez.Service.WSRiesgoLiquidezBehavior">
          <serviceMetadata httpGetEnabled="true" httpGetUrl="http://190.143.64.183:8081/SattServiceLiquidez/Service/WSRiesgoLiquidez.svc/basic" />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>


    </behaviors>

    <!--<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />-->
  </system.serviceModel>

</configuration>

spring version 1.2.0.20001

.NETframework 3.5

I don't know what happen, because it works fine in my pc(Windows server 2008 r2) and work in windows server 2012, but it doesn't work in the other server has Windows server 2008 too.

Jmperez
  • 47
  • 11

1 Answers1

1

As error says the could not load the assembly "antlr.runtime.dll". So either it is not present in your project or you are not referencing the correct one. Add this antlr.runtime.dll and try again.

Dileep
  • 338
  • 4
  • 13
  • But it work in my machine and in a dev server but when the client install his server launch this error, and I used the same installer in both servers. – Jmperez Aug 24 '16 at 19:53
  • As per your post there is the different OS version on all the machine. – Dileep Aug 24 '16 at 20:59
  • ok, first my pc(Windows server 2008 r2) dev server(Windows server 2012) Error server(Windows server 2008 r2, the same that mi pc has) – Jmperez Aug 24 '16 at 22:01