我有一个Web服务,当我在本地运行时工作正常,我已经将服务安装在服务器中进行一些测试并且它可以工作,但是当我在其他服务器上安装它时,所有请求都会发出下一个错误:
<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>
这是请求
<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>
具体错误
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
Web服务的web.config以下是
<?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
我不知道发生了什么,因为它在我的电脑(Windows server 2008 r2)中可以正常工作并在Windows Server 2012中工作,但它在其他服务器上也无法使用Windows Server 2008。
答案 0 :(得分:1)
由于错误说无法加载程序集&#34; antlr.runtime.dll&#34;。因此,要么它不存在于您的项目中,要么您没有引用正确的项目。添加此antlr.runtime.dll并重试。