开发者

Ado.net dataservices BeginExecuteBatch call works on development fails on production server with Object does not match target type

We have an ado.net dataservices 1.0 call that is being passed to a [WebGet] service operation as a batch through BeginExecuteBatch.

Everything works perfectly on our development server - we have the project configured to use IIS instead of the cassini web server to make it as close to our production server as we can.

When we publish to the production server, all the service operations work perfectly except the batch call, which fails with Object does not match target type. . I have not been able to find any cause for this.

I can even run a single non-batch style GET operation against the [WebGet] service by copying the URL used in the batch and pasting it in a browser.

I have not been able to find any information to help me solve this - any guidance would be most appreciated.

Thanks, Mike M.

Error mess开发者_StackOverflow社区age From Fiddler:

HTTP/1.1 500 Internal Server Error Content-Type: application/xml DataServiceVersion: 1.0;

An error occurred while processing this request. Object does not match target type. System.Reflection.TargetException at System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target) 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.RequestUriProcessor.CreateFirstSegment(IDataService service, String identifier, Boolean checkRights, String queryPortion, Boolean& crossReferencingUrl) at System.Data.Services.RequestUriProcessor.CreateSegments(String[] segments, IDataService service) at System.Data.Services.RequestUriProcessor.ProcessRequestUri(Uri absoluteRequestUri, IDataService service) at System.Data.Services.DataService`1.BatchDataService.HandleBatchContent(Stream responseStream)


I found that you can't do function calls in a batch. You can only do entity queries. Most annoying. It may have been fixed in a later version.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜