Link to home
Start Free TrialLog in
Avatar of maaknplan
maaknplanFlag for South Africa

asked on

Error in calling WCF service

I have an application that consumes a WCF service. On my dev server, the application works without any issues. However on my QA server, I get the following error which is not very meaningful to me. Any light which you might shed on this is much appreciated. If I point the application to the WCF service on the dev server, it works also without issue.

Summary:
DevApp -> DevWCF (works)
QAApp -> DevWCF (works)
QAApp -> QAWcf (errors)

inner:Object reference not set to an instance of an object. :
Server stack trace:
   at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message
 reply, MessageFault fault, String action, MessageVersion version, FaultConverte
r faultConverter)
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRunt
ime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean on
eway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan tim
eout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean on
eway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCall
Message methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage req
Msg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgDa
ta, Int32 type)
   at IEmployeeService.GetEmployeeFullDataInfoHR(String accountName)
   at EmployeeServiceClient.GetEmployeeFullDataInfoHR(String accountName)
   at HRWebService.Program.Main(String[] args)
outer:The communication object, System.ServiceModel.Channels.ServiceChannel, can
not be used for communication because it is in the Faulted state. :
Server stack trace:
   at System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan timeout)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage req
Msg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgDa
ta, Int32 type)
   at System.ServiceModel.ICommunicationObject.Close(TimeSpan timeout)
   at System.ServiceModel.ClientBase`1.System.ServiceModel.ICommunicationObject.
Close(TimeSpan timeout)
   at System.ServiceModel.ClientBase`1.Close()
   at System.ServiceModel.ClientBase`1.System.IDisposable.Dispose()
   at HRWebService.Program.Main(String[] args)

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of surajguptha
surajguptha
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of regevha
regevha

Information regarding the WCF service setup is required, please share with us the client "app.config" as well as any relevant errors in the event log on the server side.
Avatar of maaknplan

ASKER

The solution pointed me in the right direction. The error was not a proxy error, but an exception being thrown in the WCF code. The error was corrected and the service is now running correctly.