I have a web service WCF, which when running it in the solution with VS2015 Pro, I see it perfectly (again, within the same solution). my problem, is that now I'm doing the deploy on the server (publish method: File System). and I get the following error
Error al descargar 'http://localhost:7000/AvisLatam.Certus.Accuro.WS.Receta.Services/$metadata'.
Error de solicitud con el siguiente estado HTTP 400: Bad Request.
Los metadatos contienen una referencia que no se puede resolver: 'http://localhost:7000/AvisLatam.Certus.Accuro.WS.Receta.Services'.
No había ningún extremo escuchando en http://localhost:7000/AvisLatam.Certus.Accuro.WS.Receta.Services que pudiera aceptar el mensaje. La causa suele ser una dirección o una acción SOAP incorrecta. Consulte InnerException, si está presente, para obtener más información.
Error en el servidor remoto: (400) Solicitud incorrecta.
Si el servicio se define en la solución actual, intente compilar la solución y agregar de nuevo la referencia de servicio.
This error appears when wanting to execute from another solution in VS2015 when wanting to add it as a service reference.
The web.config of the service I am publishing (process from VS) is as follows
<system.serviceModel>
<services>
<service name="AvisLatam.Certus.Accuro.WS.Receta.Services" behaviorConfiguration="recetaBehavior">
<endpoint address="" binding="webHttpBinding" contract="AvisLatam.Certus.Accuro.WS.Receta.IServices" behaviorConfiguration="" ></endpoint>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="recetaBehavior">
<!-- Para evitar revelar información de los metadatos, establezca los valores siguientes en false antes de la implementación -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<!-- Para recibir detalles de las excepciones en los fallos, con el fin de poder realizar la depuración, establezca el valor siguiente en true. Para no revelar información sobre las excepciones, establézcalo en false antes de la implementación -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https"/>
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
</system.serviceModel>
and the interface of my service is:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using AvisLatam.Certus.Accuro.HL7;
namespace AvisLatam.Certus.Accuro.WS.Receta
{
[ServiceContract]
public interface IServices
{
[OperationContract(Action = "", Name ="RecibeReceta")]
AvisLatam.Certus.Accuro.HL7.ACKCONTENT GetRecetas_RDE_O11(AvisLatam.Certus.Accuro.HL7.RDE_O11CONTENT Receta);
[OperationContract(Action = "", Name = "RecibeProfesionales")]
AvisLatam.Certus.Accuro.HL7.ACKCONTENT GetProfesional_MFN_M02(AvisLatam.Certus.Accuro.HL7.MFN_M02CONTENT Profesionales);
}
}
The types of data returned by the service are complex types (that's why I did it with WCF), and as I said before, from the same solution in VS in another project, they work perfectly.
Can someone help me with this issue? Best regards