C# &引用;对象引用未设置为对象的实例";-Azure中的WCF REST服务

C# &引用;对象引用未设置为对象的实例";-Azure中的WCF REST服务,c#,wcf,rest,azure,C#,Wcf,Rest,Azure,我在调用winJS应用程序中的方法时遇到问题: [OperationContract] [WebInvoke(RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest)] void newUserAndImageEntry(string pArrayImage,

我在调用winJS应用程序中的方法时遇到问题:

[OperationContract]
[WebInvoke(RequestFormat = WebMessageFormat.Json,
           ResponseFormat = WebMessageFormat.Json,
           BodyStyle = WebMessageBodyStyle.WrappedRequest)]
void newUserAndImageEntry(string pArrayImage,
    string pContentType, string pUserName, string pFileName);
我得到的错误是:

 "InnerException":null
 "Message":"Object reference not set to an instance of an object."
 "StackTrace":"
    at WebRoleUploadImages.UploadImagesAJAX.newUserAndImageEntry(String pArrayImage,
       String pContentType, String pUserName, String pFileName)
    at SyncInvokenewUserAndImageEntry(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.ProcessMessage31(MessageRpc& rpc)
    at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
Type:"System.Exception"}

我甚至不知道如何找到哪个是空的对象。我检查了我发送的所有变量,它们都至少有一些内容,帮助?

错误消息可能涉及整个函数调用过程中使用的任何变量,包括处理过程中创建的方法中的局部变量。我建议直接在像VisualStudio这样的IDE中运行代码,看看代码失败的地方。如果这是Azure特有的问题,请使用Azure Emulator通过服务模拟整个请求/响应周期,这可以通过Visual Studio以及附加的调试器来完成。如果您有.pdb文件,您将获得更多有用的信息,包括引发异常的源文件中的确切行。那将是一个好的开始。夏普牙你为我打开了一个新的世界,谢谢你