none
wcf giving error after publish our webserver RRS feed

  • Question

  • System.ServiceModel.FaultException<System.ServiceModel.ExceptionDetail> was caught
      HResult=-2146233087
      Message=Object reference not set to an instance of an object.
      Source=mscorlib
      StackTrace:
        Server stack trace:
           at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
           at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
           at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
           at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
           at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
        Exception rethrown at [0]:
           at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
           at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
           at ClientForCustomerService.ServiceReference1.ICustomerService.UserLogin(LoginDetail loginDetail)
           at ClientForCustomerService.ServiceReference1.CustomerServiceClient.UserLogin(LoginDetail loginDetail) in D:\Amit\rnd\WCF\Fault_Contract_In_WCF\Fault_Contract_In_WCF\ClientForCustomerService\Service References\ServiceReference1\Reference.cs:line 230
           at ClientForCustomerService.Login.btnLogin_Click(Object sender, EventArgs e) in D:\Amit\rnd\WCF\Fault_Contract_In_WCF\Fault_Contract_In_WCF\ClientForCustomerService\Login.cs:line 37
      InnerException:
    Wednesday, April 30, 2014 1:07 PM

Answers

  • Hi,

    The above error information is just a general information, so first please try to set the following in the config file:

    <serviceDebug includeExceptionDetailInFaults="true"/>

    Also please try to enable the wcf trace to get the detailed error information.

    The following configuration taken from MSDN can be applied to enable tracing on your WCF service.

    <configuration>
      <system.diagnostics>
        <sources>
          <source name="System.ServiceModel"
                  switchValue="Information, ActivityTracing"
                  propagateActivity="true" >
            <listeners>
                 <add name="xml"/>
            </listeners>
          </source>
          <source name="System.ServiceModel.MessageLogging">
            <listeners>
                <add name="xml"/>
            </listeners>
          </source>
          <source name="myUserTraceSource"
                  switchValue="Information, ActivityTracing">
            <listeners>
                <add name="xml"/>
            </listeners>
          </source>
        </sources>
        <sharedListeners>
            <add name="xml"
                 type="System.Diagnostics.XmlWriterTraceListener"
                 initializeData="Error.svclog" />
        </sharedListeners>
      </system.diagnostics>
    </configuration>

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Thursday, May 1, 2014 2:36 AM
    Moderator

All replies

  • What is happening on Line 37 of your code?  I would wrap some code around that section to output to a text file so you can see what is being passed as parameters.

    Robert Johnston

    Wednesday, April 30, 2014 1:20 PM
  • Hi,

    The above error information is just a general information, so first please try to set the following in the config file:

    <serviceDebug includeExceptionDetailInFaults="true"/>

    Also please try to enable the wcf trace to get the detailed error information.

    The following configuration taken from MSDN can be applied to enable tracing on your WCF service.

    <configuration>
      <system.diagnostics>
        <sources>
          <source name="System.ServiceModel"
                  switchValue="Information, ActivityTracing"
                  propagateActivity="true" >
            <listeners>
                 <add name="xml"/>
            </listeners>
          </source>
          <source name="System.ServiceModel.MessageLogging">
            <listeners>
                <add name="xml"/>
            </listeners>
          </source>
          <source name="myUserTraceSource"
                  switchValue="Information, ActivityTracing">
            <listeners>
                <add name="xml"/>
            </listeners>
          </source>
        </sources>
        <sharedListeners>
            <add name="xml"
                 type="System.Diagnostics.XmlWriterTraceListener"
                 initializeData="Error.svclog" />
        </sharedListeners>
      </system.diagnostics>
    </configuration>

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Thursday, May 1, 2014 2:36 AM
    Moderator
  • Object reference not set to an instance of an object.

    In order for you to fix the problem, do you even know what that exception message means? Do you know what the message is telling? If you don't know what the message means, then you can't track down and locate the cause.

    Thursday, May 1, 2014 5:21 AM