2 Comments

 

I was getting a [Object reference not set to an instance of an object.] error, when calling a WCF service from a client application. The WCF service was build in [Any CPU] configuration, but an external dll was build in x86 modus. In this case the WCF service will only work, when you set the application pool property [Enable 32-Bit Applications] to True

image

 

 

 

Exception

[Object reference not set to an instance of an object.]
Server stack trace:
System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood
System.ServiceModel.Channels.ServiceChannel.HandleReply
System.ServiceModel.Channels.ServiceChannel.Call
System.ServiceModel.Channels.ServiceChannelProxy.InvokeService
System.ServiceModel.Channels.ServiceChannelProxy.Invoke
Exception rethrown[0]:
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke

2 Replies to “Solving: Object reference not set to an instance of an object, when calling a WCF service”

  1. What should I be doing if my service is hosted as a windows service? I am getting the same exception.

  2. Hi,
    how to get the advanced settings? Project solution properties or iis project project properties? please help me … i am also getting same error.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts