[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1077
  • Last Modified:

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

0
maaknplan
Asked:
maaknplan
1 Solution
 
surajgupthaCommented:
The error could be the WCF application code throwing an error.

Do check the event logs to see if which server code is causing this exception if events are logged or logging is done in the server WCF code.
0
 
regevhaCommented:
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.
0
 
maaknplanAuthor Commented:
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.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now