Asp.net WCF调试找不到方法

Asp.net WCF调试找不到方法,asp.net,wcf,web-services,rest,Asp.net,Wcf,Web Services,Rest,调试WCF——在我的一生中,我无法理解为什么我的服务方法返回http错误400。DLL部署在IIS中,SVC指向它-DLL中的所有其他服务方法都可用并返回正确的数据。我在IIS中的进程中附加了调试器,并且我能够单步执行所有其他服务方法,但由于某些原因,调试器甚至无法捕获对此方法的调用。符号加载正确。我甚至尝试打破所有的异常-它不想因为任何原因停止在GetCustomInquiries\u POST中,该服务仍然可用,并在返回时显示http错误400。有什么想法吗?我知道我在什么地方摸到的 我有以

调试WCF——在我的一生中,我无法理解为什么我的服务方法返回http错误400。DLL部署在IIS中,SVC指向它-DLL中的所有其他服务方法都可用并返回正确的数据。我在IIS中的进程中附加了调试器,并且我能够单步执行所有其他服务方法,但由于某些原因,调试器甚至无法捕获对此方法的调用。符号加载正确。我甚至尝试打破所有的异常-它不想因为任何原因停止在GetCustomInquiries\u POST中,该服务仍然可用,并在返回时显示http错误400。有什么想法吗?我知道我在什么地方摸到的

我有以下合同的服务:

    [OperationContract]
    [WebInvoke(BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)]
    Stream GetCustomInquiries_POST();
以及以下实施:

    public Stream GetCustomInquiries_POST()
    {
        // Returns a list of of business objects
        CustomInquiries customInquiries = WebSupport.DocumentInquiry.GetCustomInquiries();

        // Create an empty list of WCFCustomInquiry, which is a data
        // contract that exposes certain properties of a customInquiry.  
        // This list will be filled with all of the saved inquiries
        List<WCFCustomInquiry> customInquiriesToReturn = new List<WCFCustomInquiry>();

        // For each of the inquiries that were returned.
        foreach (CustomInquiry customInquiry in customInquiries)
        {

            // Create a list of properties exposed via the web service
            List<WCFProperty> savedProperties = new List<WCFProperty>();

            // For each of the properties in the saved inquiry, cast it to a WCFProperty, 
            // which is added to the list of properties exposed to the web service
            foreach (InquiryPropertyValue testProperty in customInquiry.SearchCriteria.Properties.Values)
            {
                WCFProperty savedProperty = new WCFProperty(testProperty.PropertyID, testProperty.Prompt, testProperty.DataType);
                savedProperty.inquirySearchText = testProperty.Value.ToString();
                savedProperty.inquirySearchType = testProperty.SearchType;
                savedProperties.Add(savedProperty);
            }


            // create a new webInquiryCriteria instance, which exposes the listed
            // properties to the web service.
            WCFInquiryCriteria webInquiryCriteria = new WCFInquiryCriteria(customInquiry.TopLevelFolders, customInquiry.DocTypes, customInquiry.SearchCriteria.DocumentTypes, customInquiry.SearchCriteria.TopLevelFolders, savedProperties, "", "", false, null, null);

            // Created an instance of the data-contract, using the members
            // to be exposed from the inquiry
            WCFCustomInquiry customInquiryToReturn = new WCFCustomInquiry(customInquiry.CustomInquiryId, customInquiry.Name, customInquiry.Description, customInquiry.AutoRun, customInquiry.DocTypes, customInquiry.TopLevelFolders, webInquiryCriteria, customInquiry.UserSuppliedProperties);

            // Add that new instance to the list that 
            customInquiriesToReturn.Add(customInquiryToReturn);
        }

        return WebSupport.JSONSerializationHelper.GetJSONStreamToReturn(customInquiriesToReturn);
    }
publicsstreamgetcustominquiries\u POST()
{
//返回业务对象的列表
CustomInquires CustomInquires=WebSupport.DocumentInquires.GetCustomInquires();
//创建WCFCustomInquiry的空列表,它是一个数据类型
//公开客户查询的某些属性的合同。
//此列表将填充所有已保存的查询
List customInquiriesToReturn=新列表();
//对于返回的每个查询。
foreach(客户查询中的客户查询)
{
//创建通过web服务公开的属性列表
List savedProperties=新列表();
//对于保存的查询中的每个属性,将其强制转换为WCFProperty,
//将其添加到向web服务公开的属性列表中
foreach(customInquiry.SearchCriteria.Properties.Values中的InquiryPropertyValue testProperty)
{
WCFProperty savedProperty=新的WCFProperty(testProperty.PropertyID、testProperty.Prompt、testProperty.DataType);
savedProperty.inquirySearchText=testProperty.Value.ToString();
savedProperty.inquirySearchType=testProperty.SearchType;
savedProperties.Add(savedProperty);
}
//创建一个新的webInquiryCriteria实例,该实例公开列出的
//web服务的属性。
WCFInquiryCriteria webInquiryCriteria=新的WCFInquiryCriteria(customInquiry.TopLevelFolders、customInquiry.DocTypes、customInquiry.SearchCriteria.DocumentTypes、customInquiry.SearchCriteria.TopLevelFolders、savedProperties、“,”、false、null、null);
//使用成员创建了数据协定的实例
//从调查中暴露出来
WCFCustomInquiry customInquiryToReturn=新的WCFCustomInquiry(customInquiry.customInquiry.id,customInquiry.Name,customInquiry.Description,customInquiry.AutoRun,customInquiry.DocTypes,customInquiry.TopLevelFolders,webInquiryCriteria,customInquiry.UserSuppliedProperties);
//将该新实例添加到
custominquirriestoreturn.Add(custominquirrytoreturn);
}
返回WebSupport.JSONSerializationHelper.GetJSONStreamToReturn(customInquiriesToReturn);
}

通过REST-httppost-我可以编写一个ajax方法,但为了进行测试,我通常使用XHR Poster for chrome。因此,我可以发布到,并得到错误400-但如果我发布到,我会得到预期的json项目列表。