I have two servers A and B,with the same deploy package.
A works well.
B throw an error:
<Message>The given key was not present in the dictionary.</Message>
<StackTrace>at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at webservice1.InvokeBusinessWorkflow[TWorkflow,TRQ,TRS](TRQ request)
at webservice1.ProcessOneStepCal(ProcessOneStepCalSoapIn request)
at SyncInvokeProcessOneStepCal(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</StackTrace>
<Type>System.Collections.Generic.KeyNotFoundException</Type>
I toally have no idea how this could happen.(the web service solution used to be updated from 2008 to 2010).
Could anybody help?
Sorry,I didn't claim the context clear.
In my solution,I start a workflow like this:
private TRS InvokeBusinessWorkflow<TWorkflow, TRQ, TRS>(TRQ request)
{
TRS response;
#region Workflow implementation
// Build the parameters for the Workflow
Dictionary<string, object> inputParameters = new Dictionary<string, object>();
Dictionary<string, object> outputParameters = new Dictionary<string, object>();
inputParameters.Add(typeof(TRQ).Name, request);
// Execute the Workflow
HostWorkflowService.StartWorkflow(typeof(TWorkflow), inputParameters, outputParameters);
// Build the response based on the parameters.
response = (TRS)outputParameters[typeof(TRS).Name];
#endregion
return response;
}
It works well host by IIS6 in server A(I can get what I want).
but throw exception in server B(the deloyed files are 100% the same).
unfortunately, the server B is important to me and this dirves me crasy.