locked
ADO errors are nearly impossible to decipher .. RRS feed

  • Question

  • After enabling developer attributes on the code behind class I get this error,  can anyone tell me how to decode this error ?

    The server encountered an error processing the request. The exception message is 'Exception has been thrown by the target of an invocation.'. See server logs for more details. The exception stack trace is:

    at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Data.Services.DataServiceConfiguration.InvokeStaticInitialization(Type type) at System.Data.Services.DataService`1.CreateConfiguration(Type dataServiceType, IDataServiceProvider provider, Object dataSourceInstance) at System.Data.Services.DataService`1.CreateProvider(Type dataServiceType, Object dataSourceInstance, DataServiceConfiguration& configuration) at System.Data.Services.DataService`1.EnsureProviderAndConfigForRequest() at System.Data.Services.DataService`1.ProcessRequestForMessage(Stream messageBody) at SyncInvokeProcessRequestForMessage(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.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)



    Tuesday, September 16, 2008 9:05 AM

Answers

  • For security reasons we don't surface the inner exception except for DataServiceException.  So this might help your debugging:

     

    public static void InitializeService(IDataServiceConfiguration config)

    {

        try

        {

            // The body of your InitializeService here.

        }

        catch (Exception e)

        {

            throw new DataServiceException(e.Message + "\n" + e.StackTrace);

        }

    }

     

    Thanks,

    -J

    Tuesday, September 16, 2008 9:45 PM
    Answerer

All replies

  • Looks like the InitializeService() method of your DataService class is throwing.

    Tuesday, September 16, 2008 8:27 PM
    Answerer
  • Thanks Li,  I have 50  lines of  Initialization code for various tables and security settings;  Now I have to go back to commenting each line and do compile/run cycle to see where the problem is.   There got to be easy way like in the error message says  line number where the problem is ?

     

     

     

    Tuesday, September 16, 2008 8:36 PM
  • For security reasons we don't surface the inner exception except for DataServiceException.  So this might help your debugging:

     

    public static void InitializeService(IDataServiceConfiguration config)

    {

        try

        {

            // The body of your InitializeService here.

        }

        catch (Exception e)

        {

            throw new DataServiceException(e.Message + "\n" + e.StackTrace);

        }

    }

     

    Thanks,

    -J

    Tuesday, September 16, 2008 9:45 PM
    Answerer