When I run a windows service which is trying to send XML data via SOAP, I am getting this error. Note, this is converted over from a C++ version. I know svcutil is used to generate the C++ code based on other files. I haven't been able to figure out if I'm missing a reference.
Application: ENS_Service.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException
at System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(System.ServiceModel.Description.ServiceEndpoint, System.String)
at System.ServiceModel.ChannelFactory.ApplyConfiguration(System.String, System.Configuration.Configuration)
at System.ServiceModel.ChannelFactory.ApplyConfiguration(System.String)
at System.ServiceModel.ChannelFactory.InitializeEndpoint(System.String, System.ServiceModel.EndpointAddress)
at System.ServiceModel.ChannelFactory`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.String, System.ServiceModel.EndpointAddress)
at System.ServiceModel.ConfigurationEndpointTrait`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].CreateSimplexFactory()
at System.ServiceModel.ConfigurationEndpointTrait`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].CreateChannelFactory()
at System.ServiceModel.ClientBase`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].CreateChannelFactoryRef(System.ServiceModel.EndpointTrait`1<System.__Canon>)
at System.ServiceModel.ClientBase`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].InitializeChannelFactoryRef()
at System.ServiceModel.ClientBase`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor()
at ENS_Service.Entities.WebServiceWebLogSoapClient..ctor()
at EnsService.WebLogUploader.ThreadProc()
at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()
The SoapClient class is here.
using System.Data;
using System.ServiceModel;
using System.Threading.Tasks;
namespace ENS_Service.Entities
{
[GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
public class WebServiceWebLogSoapClient : ClientBase<IWebServiceWebLogSoap>, IWebServiceWebLogSoap
{
public WebServiceWebLogSoapClient() {}
public WebLog_Response UpdateWebLogWithAYSForNotificationId(WebLogHeader webLogHeader, WebLogWS webLog)
{
var inValue = new UpdateWebLogWithAYSForNotificationIdRequest();
inValue.WebLogHeader = webLogHeader;
inValue.objWebLog = webLog;
UpdateWebLogWithAYSForNotificationIdResponse retVal = ((IWebServiceWebLogSoap)(this)).UpdateWebLogWithAYSForNotificationId(inValue);
return retVal.UpdateWebLogWithAYSForNotificationIdResult;
}
public AddWebLogResponse AddWebLog(AddWebLogRequest request)
{
throw new NotImplementedException();
}
public Task<AddWebLogResponse> AddWebLogAsync(AddWebLogRequest request)
{
throw new NotImplementedException();
}
public DataSet GetRecentWebLog(int top)
{
throw new NotImplementedException();
}
public Task<DataSet> GetRecentWebLogAsync(int top)
{
throw new NotImplementedException();
}
public DataSet GetWebLog(int refNum)
{
throw new NotImplementedException();
}
public Task<DataSet> GetWebLogAsync(int refNum)
{
throw new NotImplementedException();
}
public UpdateWebLogWithAYSForNotificationIdResponse UpdateWebLogWithAYSForNotificationId(UpdateWebLogWithAYSForNotificationIdRequest request)
{
throw new NotImplementedException();
}
public Task<UpdateWebLogWithAYSForNotificationIdResponse> UpdateWebLogWithAYSForNotificationIdAsync(UpdateWebLogWithAYSForNotificationIdRequest request)
{
throw new NotImplementedException();
}
public UpdateWebLogWithCmisForNotificationIdResponse UpdateWebLogWithCmisForNotificationId(UpdateWebLogWithCmisForNotificationIdRequest request)
{
throw new NotImplementedException();
}
public Task<UpdateWebLogWithCmisForNotificationIdResponse> UpdateWebLogWithCmisForNotificationIdAsync(UpdateWebLogWithCmisForNotificationIdRequest request)
{
throw new NotImplementedException();
}
}
}