Problem
There's WCF connected to Silverlight. When it's time for the service to return args, it returns an error with the exception and no actual result that it should return.
Exception
Value cannot be null.
Parameter name: headers
There's no parameter named headers. I put emphasis on not having a field named headers in the model which the service returns.
Possible Solution which didn't work out
- Checked every
Any(),WhereandCount()not used when it's null - Checked
{get;}doesn't exist except when it's withset; - Traced whole of code and it didn't have any exception or null value
- Checked whole of code to be in different
try-catches - Checked
Web.configand all of connection strings are right; . - I updated the service multiple times and checked its configuration
- I couldn't remove
defining queryI wasn't allowed to
Stack Trace
at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result)
at UIE.SrvE.SrvEClient.SrvEClientChannel.EndGetSubmit(IAsyncResult result)
at UIE.SrvE.SrvEClient.UIE.SrvEngineer.ISrvE.EndGetSubmit(IAsyncResult result)
at UIE.SrvE.SrvEClient.OnEndGetSubmit(IAsyncResult result)
at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)
There are so many questions about this exception like this one source but none of them is about headers.
Please, suggest to me any possible solutions.