This project has moved and is read-only. For the latest updates, please go here.

Object reference not set to an instance

May 14, 2013 at 6:34 PM
I am using WCF Loadtest for generating the code from the WCF message log file. But the problem is if I select all the calls captured and then provide the proxy assembly, it does not generate the code.
It gives error like "Object reference not set to an instance". But if I take out 2 calls from the list of calls by unchecking the checkboxes beside it, then provide the same proxy assembly. It generates the code. The code also works fine. But we need to generate the left out calls as well.
How can we do that? Can anybody help in this case?
May 15, 2013 at 7:58 AM
Can you give me some details about the calls that are failing?


May 15, 2013 at 11:27 AM
Hi Rob,

Thanks a lot for the reply. Actually in this case all the endpoints are using NetTcpBinding. We have all the enpoint listed in the client configuration file with the binding configuration and behavior configuration in it. I am able to see all the call details and their response in the message log file. Even I am getting the call details for the 2 calls which are not getting generated. I have only one proxy assembly(dll) which is having all the proxies. When I am creating C# script by providing this assembly, it generates code for other calls and adding this dll under the reference node of the solution. I am able to create the proxy client for the particular service by hand and through the proxy client I am able to see the call which is not getting generated by the tool. From the log I am able to see that a lot of things are passed to this call. So creating this call by hand would be very difficult.

The call looks like below one.

<E2ETraceEvent xmlns="">
<System xmlns="">
<SubType Name="Information">0</SubType>
<TimeCreated SystemTime="2013-05-14T10:17:37.2283235Z" />
<Source Name="System.ServiceModel.MessageLogging" />
<Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" />
<Execution ProcessName="SomeClient-UAT" ProcessID="5256" ThreadID="8" />
<Channel />
<Computer>Some Computer</Computer>
<MessageLogTraceRecord Time="2013-05-14T18:17:37.2283235+08:00" Source="ServiceLevelSendRequest" Type="System.ServiceModel.Dispatcher.OperationFormatter+OperationFormatterMessage" xmlns="">
<s:Envelope xmlns:a="" xmlns:s="">
<a:Action s:mustUnderstand="1">>
<CUSTOM_HEADER xmlns="com.SomeClient">
<CUSTOM_HEADER xmlns="Key"><?xml version="1.0" encoding="utf-16"?>
<CustomHeaderData xmlns:xsi="" xmlns:xsd="">

Please note that I had to skip the body part of this call since it is very big, and this forum is not supporting this many characters.
May 15, 2013 at 11:40 AM
I think it would help to see the signatures of the problem calls, including any types referenced if possible.