error when returning an XElement type as an object in a WCF service - wcf

Here is my operation contract:
[ServiceContract]
public interface IService
{
[OperationContract]
object Move();
}
Here is the implementation for the operation contract. I want to return XElement as an object, leaving client to convert the object back to XElement
public object Move()
{
object _x;
var xmlTree1 = new XElement("Root",
new XElement("Child", 1),
new XElement("Child", 2),
new XElement("Child", 3),
new XElement("Child", 4),
new XElement("Child", 5),
new XElement("Child", 6)
);
var xmlTree2 = new XElement("Root",
from el in xmlTree1.Elements()
where ((int) el >= 3 && (int) el <= 5)
select el
);
_x = xmlTree2;
return _x;
}
Here is the client code:
XElement _xmlelem;
ServiceClient sc = new ServiceClient();
_xmlelem = (XElement)sc.Move();
Below is the stack strace of the error message:
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ClientReliableChannelBinder`1.RequestClientReliableChannelBinder`1.OnRequest(TRequestChannel channel, Message message, TimeSpan timeout, MaskingMode maskingMode)
at System.ServiceModel.Channels.ClientReliableChannelBinder`1.Request(Message message, TimeSpan timeout, MaskingMode maskingMode)
at System.ServiceModel.Channels.ClientReliableChannelBinder`1.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Security.SecuritySessionClientSettings`1.SecurityRequestSessionChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at ConsoleApplication1.ServiceReference1.IService.Move()
at ConsoleApplication1.ServiceReference1.ServiceClient.Move() in C:\Delete\ConsoleApplication1\Service References\ServiceReference1\Reference.cs:line 128
at ConsoleApplication1.Program.Main(String[] args) in C:\Delete\ConsoleApplication1\Program.cs:line 20
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

You're asking a WCF service to deserialize a .NET type (XElement in your case) to a requesting client and then have the client cast the .NET object type return value to a XElement type. WCF doesn't support that kind of deserialization unless you configure it for .NET serialization by using the NetDataContractSerializer instead of the standard DataContractSerializer.
There are a lot of constraints to using NetDataContractSerializer so generally it is not a good practice. I believe you'd be better off returning straight XML. The answer in this question shows how to deal with XML in a data contract.

Related

Sitecore Lucene Search not working after 7.2 update-6 (160123) to 7.5 initial release (141003) upgrade

I upgraded from 7.2 update-6 (160123) to 7.5 initial release (141003)
The issue is search isn't working and I can't rebuild the indexes or do a site publish.
The site is using Lucene.
I got the upgrade files from here:
https://sdn.sitecore.net/Products/Sitecore%20V5/Sitecore%20CMS%207/Update/7_5_rev_141003/Upgrade_Instructions.aspx
I followed the upgrade steps here: https://sdn.sitecore.net/upload/sitecore7/75/xdb_upgrade_and_conversion_guide_sc75-a4.pdf
Updated configs with changes here:
https://sdn.sitecore.net/products/sitecore%20v5/sitecore%20cms%207/releasenotes/webconfig/75_141003.aspx
A few things I tried but didnt resolve:
I re ran all the install steps
We have a custom index which I updated in line with the default web index config, I also tried removing it
I tried overwriting the updated lucene configs with the default ones
from the 7.5 initial install
I disabled the Solr related configs.
The common error appears to be:
Exception: System.ArgumentNullException
Message: Value cannot be null.
Parameter name: type
Source: Sitecore.ContentSearch.Linq
at Sitecore.ContentSearch.Utilities.ReflectionUtility.CreateInstance(Type type)
at Sitecore.ContentSearch.ProviderIndexConfiguration.AddVirtualFieldProcessor(XmlNode configNode)
Log entry when publishing:
7192 03:48:14 INFO Job started: Publish to 'web'
7192 03:48:15 ERROR Exception
Exception: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at (Object , Object[] )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Jobs.Job.ThreadEntry(Object state)
Nested Exception
Exception: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at Sitecore.Configuration.Factory.AssignProperties(Object obj, Object[] properties)
at Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper)
at Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
at Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert)
at Sitecore.Configuration.Factory.CreateFromReference(XmlNode configNode, String[] parameters, Boolean assert)
at Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
at Sitecore.Configuration.Factory.GetInnerObject(XmlNode paramNode, String[] parameters, Boolean assert)
at Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper)
at Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
at Sitecore.Configuration.Factory.GetInnerObject(XmlNode paramNode, String[] parameters, Boolean assert)
at Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper)
at Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
at Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert)
at Sitecore.ContentSearch.ContentSearchManager.get_SearchConfiguration()
at Sitecore.ContentSearch.ContentSearchManager.GetIndex(String name)
at Sitecore.Social.BusinessLogic.Search.SearchProvider..ctor()
at DynamicInjectoreb8bc1efd99e4704b4477c9c2ad12999(Object[] )
at Ninject.Activation.Context.Resolve()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Ninject.Activation.Providers.StandardProvider.Create(IContext context)
at Ninject.Activation.Context.Resolve()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Ninject.Activation.Providers.StandardProvider.Create(IContext context)
at Ninject.Activation.Context.Resolve()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.<CastIterator>d__b1`1.MoveNext()
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
at Sitecore.Social.Client.MessagePosting.Handlers.ItemPublishedHandler.PublishSocialMessages(Object sender, EventArgs args)
at Sitecore.Events.Event.EventSubscribers.RaiseEvent(String eventName, Object[] parameters, EventResult result)
at Sitecore.Events.Event.RaiseEvent(String eventName, Object[] parameters)
at (Object , Object[] )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Publishing.Pipelines.PublishItem.PublishItemPipeline.Run(PublishItemContext context)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable`1 entries, PublishContext context)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable`1 entries, PublishContext context)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable`1 entries, PublishContext context)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable`1 entries, PublishContext context)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable`1 entries, PublishContext context)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable`1 entries, PublishContext context)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.ProcessEntries(IEnumerable`1 entries, PublishContext context)
at Sitecore.Publishing.Pipelines.Publish.ProcessQueue.Process(PublishContext context)
at (Object , Object[] )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Publishing.Pipelines.Publish.PublishPipeline.Run(PublishContext context)
at Sitecore.Publishing.Publisher.PublishWithResult()
Nested Exception
Exception: System.ArgumentNullException
Message: Value cannot be null.
Parameter name: type
Source: Sitecore.ContentSearch.Linq
at Sitecore.ContentSearch.Utilities.ReflectionUtility.CreateInstance(Type type)
at Sitecore.ContentSearch.ProviderIndexConfiguration.AddVirtualFieldProcessor(XmlNode configNode)
Log entry when using Indexing manager:
472 04:01:45 ERROR Application error.
Exception: System.Web.HttpUnhandledException
Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Source: System.Web
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Nested Exception
Exception: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at Sitecore.Web.UI.Sheer.ClientPage.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Nested Exception
Exception: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at Sitecore.Configuration.Factory.AssignProperties(Object obj, Object[] properties)
at Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper)
at Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
at Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert)
at Sitecore.Configuration.Factory.CreateFromReference(XmlNode configNode, String[] parameters, Boolean assert)
at Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
at Sitecore.Configuration.Factory.GetInnerObject(XmlNode paramNode, String[] parameters, Boolean assert)
at Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper)
at Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
at Sitecore.Configuration.Factory.GetInnerObject(XmlNode paramNode, String[] parameters, Boolean assert)
at Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper)
at Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
at Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert)
at Sitecore.ContentSearch.ContentSearchManager.get_SearchConfiguration()
at Sitecore.ContentSearch.Client.Forms.IndexingManagerWizard.BuildIndexes()
Nested Exception
Exception: System.ArgumentNullException
Message: Value cannot be null.
Parameter name: type
Source: Sitecore.ContentSearch.Linq
at Sitecore.ContentSearch.Utilities.ReflectionUtility.CreateInstance(Type type)
at Sitecore.ContentSearch.ProviderIndexConfiguration.AddVirtualFieldProcessor(XmlNode configNode)
After taking another look I found that the social connector module was installed, this adds many config files but the two causing and issue where:
Sitecore.Social.Lucene.Index.Master.config
Sitecore.Social.Lucene.Index.Web.config
These files need to be upgraded or disabled.
The final issue I found was we had an additional config file which doesnt exist in the 7.5 initial release install:
Sitecore.Speak.ContentSearch.Lucene.config
Once i disabled this config in addition to the social connector configs the site began working as expected.

RavenDB - EmbeddableDocumentStore already disposed or NRE

This question is about creating a single instance of the Raven document store in the lifetime of a ASP.Net MVC application and subsequently using a new IDocumentSession per request to serve the client with. I believe to have followed the recommended procedure described at http://ravendb.net/kb/3/using-ravendb-in-an-asp-net-mvc-website I'm still experiencing errors once the site is deployed.
My code looks as follows. The HepApp class contains the document store and is referenced by the application:
internal class HepApp
{
internal static readonly Object padlock = new object();
private static IDocumentStore _DB;
internal IDocumentStore DB
{
get
{
if (_DB == null)
{
lock (padlock)
{
if (_DB == null)
{
_DB = new EmbeddableDocumentStore().Initialize();
return _DB;
}
}
}
return _DB;
}
}
public IDocumentSession GetSession()
{
return DB.OpenSession();
}
}
My MVC Controller:
public class HomeController : Controller
{
IDocumentSession RavenSession;
public HomeController()
{
}
protected void Init()
{
RavenSession = MvcApplication.HepApp.GetSession();
}
protected override void OnActionExecuting(ActionExecutingContext filterContext)
{
base.OnActionExecuting(filterContext);
Init();
}
The application class Global.asax binds to:
public class MvcApplication : System.Web.HttpApplication
{
static readonly Object padlock = new object();
static HepApp _HepApp;
internal static HepApp HepApp
{
get
{
if(_HepApp == null)
{
lock(padlock)
{
if(_HepApp == null)
{
_HepApp = new HepApp();
}
}
}
return _HepApp;
}
}
When the application starts the document store should be initialized and live for the remainder of the application's lifetime. For each request a new Session object is created. At least, that's the idea. Instead null reference errors occur in OnActionExecuting (though I suspect the HomeController.Init method but it doesn't appear on the stack) or the EmbeddableDocumentStore object is reported als already disposed. Confusingly, these errors only crop up after the application has been running for a while which might suggest it's an app pool recycle issue
EDIT:
The errors differ but all seem to indicate a problem with the instantiation of the database store :
[EsentFileAccessDeniedException: Cannot access file, the file is locked or in use]
[InvalidOperationException: Could not write to location: \192.168.0.100\localuser\x\App_Data/Raven. Make sure you have read/write permissions for this path.]
System.InvalidOperationException: Could not write to location: \192.168.0.100\localuser\x\App_Data/Raven. Make sure you have read/write permissions for this path. ---> Microsoft.Isam.Esent.Interop.EsentFileAccessDeniedException: Cannot access file, the file is locked or in use
at Microsoft.Isam.Esent.Interop.Api.Check(Int32 err)
at Microsoft.Isam.Esent.Interop.Api.JetInit(JET_INSTANCE& instance)
at Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGenerator, OrderedPartCollection1 documentCodecs)
--- End of inner exception stack trace ---
at Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGenerator, OrderedPartCollection1 documentCodecs)
at Raven.Database.DocumentDatabase..ctor(InMemoryRavenConfiguration configuration, TransportState transportState)
at Raven.Client.Embedded.EmbeddableDocumentStore.InitializeInternal()
at Raven.Client.Document.DocumentStore.Initialize()
at HEPlaceHolder.HepApp.get_DB() in e:\projects\HEPlaceHolder\HEPlaceHolder\Logic\HepApp.cs:line 27
at HEPlaceHolder.Controllers.HomeController.OnActionExecuting(ActionExecutingContext filterContext) in e:\projects\HEPlaceHolder\HEPlaceHolder\Controllers\HomeController.cs:line 31
at System.Web.Mvc.Controller.System.Web.Mvc.IActionFilter.OnActionExecuting(ActionExecutingContext filterContext)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.InvokeActionMethodFilterAsynchronouslyRecursive(Int32 filterIndex)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass33.b__31(AsyncCallback asyncCallback, Object asyncState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult1.CallBeginDelegate(AsyncCallback callback, Object callbackState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeActionMethodWithFilters(ControllerContext controllerContext, IList1 filters, ActionDescriptor actionDescriptor, IDictionary2 parameters, AsyncCallback callback, Object state)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.b__19(AsyncCallback asyncCallback, Object asyncState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult1.CallBeginDelegate(AsyncCallback callback, Object callbackState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext, String actionName, AsyncCallback callback, Object state)
at System.Web.Mvc.Controller.b__1c(AsyncCallback asyncCallback, Object asyncState, ExecuteCoreState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid1.CallBeginDelegate(AsyncCallback callback, Object callbackState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state)
at System.Web.Mvc.Controller.b__14(AsyncCallback asyncCallback, Object callbackState, Controller controller)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid1.CallBeginDelegate(AsyncCallback callback, Object callbackState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state)
at System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state)
at System.Web.Mvc.MvcHandler.b__4(AsyncCallback asyncCallback, Object asyncState, ProcessRequestState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid1.CallBeginDelegate(AsyncCallback callback, Object callbackState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state)
at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
[ObjectDisposedException: The document store has already been disposed and cannot be used
Object name: 'EmbeddableDocumentStore'.]
Raven.Client.DocumentStoreBase.EnsureNotClosed() +82
System.Web.Mvc.Async.WrappedAsyncResultBase`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +128
[NullReferenceException: Object reference not set to an instance of an object.]
HEPlaceHolder.Controllers.HomeController.OnActionExecuting(ActionExecutingContext filterContext) in e:\projects\HEPlaceHolder\HEPlaceHolder\Controllers\HomeController.cs:31
System.Web.Mvc.Controller.System.Web.Mvc.IActionFilter.OnActionExecuting(ActionExecutingContext filterContext) +10
System.InvalidOperationException: Could not open transactional storage: \192.168.0.100\localuser\x\App_Data/Raven\Data ---> Microsoft.Isam.Esent.Interop.EsentTempPathInUseException: Temp path already used by another database instance
at Microsoft.Isam.Esent.Interop.Api.Check(Int32 err)
at Microsoft.Isam.Esent.Interop.Api.JetInit(JET_INSTANCE& instance)
at Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGenerator, OrderedPartCollection1 documentCodecs)
--- End of inner exception stack trace ---
at Raven.Storage.Esent.TransactionalStorage.Initialize(IUuidGenerator uuidGenerator, OrderedPartCollection1 documentCodecs)
at Raven.Database.DocumentDatabase..ctor(InMemoryRavenConfiguration configuration, TransportState transportState)
at Raven.Client.Embedded.EmbeddableDocumentStore.InitializeInternal()
at Raven.Client.Document.DocumentStore.Initialize()
at HEPlaceHolder.HepApp.get_DB() in e:\projects\HEPlaceHolder\HEPlaceHolder\Logic\HepApp.cs:line 27
at HEPlaceHolder.Controllers.HomeController.OnActionExecuting(ActionExecutingContext filterContext) in e:\projects\HEPlaceHolder\HEPlaceHolder\Controllers\HomeController.cs:line 31
at System.Web.Mvc.Controller.System.Web.Mvc.IActionFilter.OnActionExecuting(ActionExecutingContext filterContext)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.InvokeActionMethodFilterAsynchronouslyRecursive(Int32 filterIndex)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass33.b__31(AsyncCallback asyncCallback, Object asyncState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult1.CallBeginDelegate(AsyncCallback callback, Object callbackState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeActionMethodWithFilters(ControllerContext controllerContext, IList1 filters, ActionDescriptor actionDescriptor, IDictionary2 parameters, AsyncCallback callback, Object state)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.b__19(AsyncCallback asyncCallback, Object asyncState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult1.CallBeginDelegate(AsyncCallback callback, Object callbackState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext, String actionName, AsyncCallback callback, Object state)
at System.Web.Mvc.Controller.b__1c(AsyncCallback asyncCallback, Object asyncState, ExecuteCoreState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid1.CallBeginDelegate(AsyncCallback callback, Object callbackState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state)
at System.Web.Mvc.Controller.b__14(AsyncCallback asyncCallback, Object callbackState, Controller controller)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid1.CallBeginDelegate(AsyncCallback callback, Object callbackState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state)
at System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state)
at System.Web.Mvc.MvcHandler.b__4(AsyncCallback asyncCallback, Object asyncState, ProcessRequestState innerState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid1.CallBeginDelegate(AsyncCallback callback, Object callbackState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase1.Begin(AsyncCallback callback, Object state, Int32 timeout)
at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
at System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state)
at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
EDIT:
Whenever the bin folder is updated with a tweaked version to debug the problem the site will initially run ok, presumably because the application is reset.

WCF-Exception while returning List<T>

in my following application, i generate a List of the class 'JobManager'.
List<JobManager>
The access to the database and filling my list is working perfect. It seems there is a problem for returning such list to my client.
In detail,my code looks like this
IService Class
OperationContract(Name = "ReadJobQueue")]
[FaultContract(typeof(FaultException))]
List<JobManager> AccessManager(List<string> status,string process, string dtFrom, string dtTo);
Service : IService
public List<JobManager> AccessManager(List<string> status, string process, string dtFrom, string dtTo)
{
//return 'new List<JobManager>()' does work, without any data being filled.
return new JobBuilder(status, process, dtFrom, dtTo);
}
[DataContract]
public class JobManager
{
List<JobManager> _jobManagerchildren = new List<JobManager>();
[DataMember(IsRequired = true, Order = 0)]
public string Description { get; set; }
[DataMember]
public List<JobManager> JobManagerChildren
{
get { return _jobManagerchildren; }
internal set { _jobManagerchildren = value; }
}
}
internal class JobBuilder : List<JobManager>
{
public JobBuilder(List<string> status, string process, string dtFrom, string dtTo)
: base()
{
DataTable dt = new Database().AccessJobQueue(status, process, dtFrom, dtTo);
foreach (DataRow row in dt.Rows)
{
Add(new JobManager { Description = row[1].ToString(), JobManagerChildren = JobDetail(row[0].ToString()) });
}
}
...
}
Have i missed something for my JobManager class?
edit error code / exception
System.Net.Sockets.SocketException:
An existing connection was been closed by the remotehost
bei System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size
, SocketFlags socketFlags)
bei System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int
32 offset, Int32 size, TimeSpan timeout, Boolean closing)
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int
32 offset, Int32 size, TimeSpan timeout, Boolean closing)
bei System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 o
ffset, Int32 size, TimeSpan timeout)
bei System.ServiceModel.Channels.DelegatingConnection.Read(Byte[] buffer, Int
32 offset, Int32 size, TimeSpan timeout)
bei System.ServiceModel.Channels.ConnectionStream.Read(Byte[] buffer, Int32 o
ffset, Int32 count)
bei System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32
count)
bei System.Net.Security.NegotiateStream.StartFrameHeader(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
bei System.Net.Security.NegotiateStream.ProcessRead(Byte[] buffer, Int32 offs
et, Int32 count, AsyncProtocolRequest asyncRequest)
--- Ende der internen Ausnahmestapelüberwachung ---
bei System.Net.Security.NegotiateStream.ProcessRead(Byte[] buffer, Int32 offs
et, Int32 count, AsyncProtocolRequest asyncRequest)
bei System.Net.Security.NegotiateStream.Read(Byte[] buffer, Int32 offset, Int
32 count)
bei System.ServiceModel.Channels.StreamConnection.Read(Byte[] buffer, Int32 o
ffset, Int32 size, TimeSpan timeout)
--- Ende der internen Ausnahmestapelüberwachung ---
Server stack trace:
bei System.ServiceModel.Channels.StreamConnection.Read(Byte[] buffer, Int32 o
ffset, Int32 size, TimeSpan timeout)
bei System.ServiceModel.Channels.SessionConnectionReader.Receive(TimeSpan tim
eout)
bei System.ServiceModel.Channels.SynchronizedMessageSource.Receive(TimeSpan t
imeout)
bei System.ServiceModel.Channels.FramingDuplexSessionChannel.Receive(TimeSpan
timeout)
bei System.ServiceModel.Channels.FramingDuplexSessionChannel.TryReceive(TimeS
pan timeout, Message& message)
bei System.ServiceModel.Dispatcher.DuplexChannelBinder.Request(Message messag
e, TimeSpan timeout)
bei System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean o
neway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan ti
meout)
bei System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCal
lMessage methodCall, ProxyOperationRuntime operation)
bei System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
bei System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage re
qMsg, IMessage retMsg)
bei System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgD
ata, Int32 type)
bei WcfSys.Shared.IService.AccessManager(List`1 status, String process, S
tring dtFrom, String dtTo)
bei WcfSys.Server.Program.Main() in WcfSys.Ser
ver\Program.cs:Zeile 66.
Actually, what you're sending back to the client is a List<JobManager>, but actually it's a derived class. So there are two ways of fixing this:
Copy all entries from JobBuilder to a new List<JobManager> and return that new list
Make JobBuilder a DataContract, too.
As - by OOP principles - it is know that the object you're returning is a JobBuilder, the runtime tries to serialize the JobBuilder instance. This, however, is not a know type for WCF communication.

WP7 Testing on phone device error but fine on emulator

I get an error when debugging on my phone device but not on the emulator. It appears to error every time data is requested from the server (hosted using WCF/Odata using IIS Express). The code concerned is below (note that the problem occurs on ALL data access):
public void LoadData()
{
IsDataLoaded = false;
string queryUri = string.Format("Jobs?$filter=ApplicantID eq {0}", 1);
jobData.LoadAsync(new Uri(queryUri, UriKind.Relative));
jobData.LoadCompleted += new EventHandler<LoadCompletedEventArgs>(jobData_LoadCompleted);
}
void jobData_LoadCompleted(object sender, LoadCompletedEventArgs e)
{
if (e.Error != null)
{
MessageBox.Show(e.Error.Message);
}
else
{
if (jobData.Continuation != null)
{
jobData.LoadNextPartialSetAsync();
}
}
IsDataLoaded = true;
}
When I use the emulator, everything goes OK, however when I use my WP7 device I get a great error: An error occurred while processing this request
Even better, the inner exception just says NotFound.
Even the stacktrace isn't that helpful:
at System.Data.Services.Client.BaseAsyncResult.EndExecute[T](Object source, String method, IAsyncResult asyncResult)
at System.Data.Services.Client.QueryResult.EndExecute[TElement](Object source, IAsyncResult asyncResult)
at System.Data.Services.Client.DataServiceRequest.EndExecute[TElement](Object source, DataServiceContext context, IAsyncResult asyncResult)
at System.Data.Services.Client.DataServiceContext.EndExecute[TElement](IAsyncResult asyncResult)
at System.Data.Services.Client.DataServiceCollection`1.<>c__DisplayClass6.<LoadAsync>b__5(IAsyncResult asyncResult)
at System.Data.Services.Client.DataServiceCollection`1.<>c__DisplayClass11.<>c__DisplayClass13.<BeginLoadAsyncOperation>b__f()
at System.Reflection.RuntimeMethodInfo.InternalInvoke(RuntimeMethodInfo rtmi, Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at System.Delegate.DynamicInvokeOne(Object[] args)
at System.MulticastDelegate.DynamicInvokeImpl(Object[] args)
at System.Delegate.DynamicInvoke(Object[] args)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.Dispatch(DispatcherPriority priority)
at System.Windows.Threading.Dispatcher.OnInvoke(Object context)
at System.Windows.Hosting.CallbackCookie.Invoke(Object[] args)
at System.Windows.Hosting.DelegateWrapper.InternalInvoke(Object[] args)
at System.Windows.RuntimeHost.ManagedHost.InvokeDelegate(IntPtr pHandle, Int32 nParamCount, ScriptParam[] pParams, ScriptParam& pResult)
Has anyone had this and resolved it previously?

CommunicationObjectAbortedException during reading large array from server

I'm receiving such exception during reading array of 40000 items.
Is there an idea why does it happen.
I've changed send/receive timeout to 30 min. Not helped.
System.ServiceModel.CommunicationObjectAbortedException was unhandled
by user code Message=The socket connection has been disposed.
Source=mscorlib StackTrace:
Server stack trace:
at System.ServiceModel.Channels.StreamConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
at System.ServiceModel.Channels.ConnectionStream.Read(Byte[] buffer, Int32 offset, Int32 count, TimeSpan timeout)
at System.ServiceModel.Channels.ConnectionStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.ServiceModel.Channels.SingletonConnectionReader.SingletonInputConnectionStream.ReadCore(Byte[]
buffer, Int32 offset, Int32 count)
at System.ServiceModel.Channels.SingletonConnectionReader.SingletonInputConnectionStream.Read(Byte[]
buffer, Int32 offset, Int32 count)
at System.ServiceModel.Channels.DelegatingStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.ServiceModel.Channels.MaxMessageSizeStream.Read(Byte[] buffer,
Int32 offset, Int32 count)
at System.ServiceModel.Channels.SingletonConnectionReader.Close(TimeSpan
timeout)
at System.ServiceModel.Channels.SingletonConnectionReader.DoneReceiving(Boolean
atEof, TimeSpan timeout)
at System.ServiceModel.Channels.SingletonConnectionReader.DoneReceiving(Boolean
atEof)
at System.ServiceModel.Channels.SingletonConnectionReader.SingletonInputConnectionStream.Close()
at System.ServiceModel.Channels.DelegatingStream.Close()
at System.Xml.XmlBufferReader.Close()
at System.Xml.XmlBaseReader.Close()
at System.Xml.XmlBinaryReader.Close()
at System.Xml.XmlReader.Dispose(Boolean disposing)
at System.Xml.XmlReader.System.IDisposable.Dispose()
at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeBodyContents(Message
message, Object[] parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeReply(Message
message, Object[] parameters)
at System.ServiceModel.Dispatcher.ProxyOperationRuntime.AfterReply(ProxyRpc&
rpc)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime
operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins,
Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins,
Object[] outs)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage
methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage
message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)
at AlexSoft.Core.RemoteFacade.Contract.AdministrationSvc.IAdministrationRmService.GetAllBins()
at _dynamic_AlexSoft.Core.RemoteFacade.Contract.AdministrationSvc.IAdministrationRmService.GetAllBins(Object
, Object[] )
at Spring.Reflection.Dynamic.SafeMethod.Invoke(Object target, Object[] arguments)
at Spring.Aop.Framework.DynamicMethodInvocation.InvokeJoinpoint()
at Spring.Aop.Framework.AbstractMethodInvocation.Proceed()
at AlexSoft.Desktop.Services.RemoteFacade.ExtractRemoteExceptionAdvice.Invoke(IMethodInvocation
invocation) in
D:\proj\communic\trunk_fix_not_opened\src\SmartClient\Desktop.Services\RemoteFacade\ExtractRemoteExceptionAdvice.cs:line
15
at Spring.Aop.Framework.AbstractMethodInvocation.Proceed()
at Spring.Aop.Framework.DynamicProxy.AdvisedProxy.Invoke(Object proxy, Object target, Type targetType, MethodInfo targetMethod,
MethodInfo proxyMethod, Object[] args, IList interceptors)
at CompositionAopProxy_8e3e641f50c44b68b5809af44bfae8bd.GetAllBins()
at AlexSoft.Desktop.Services.RemoteFacade.RemoteAdministrationService.<>c__DisplayClass2.b__0(IAdministrationRmService
svc) in
D:\proj\communic\trunk_fix_not_opened\src\SmartClient\Desktop.Services\RemoteFacade\RemoteAdministrationService.cs:line
18
at AlexSoft.Desktop.Services.RemoteFacade.AbstractRemoteService1.ExecuteRmAction(RmAction
action) in
D:\proj\communic\trunk_fix_not_opened\src\SmartClient\Desktop.Services\RemoteFacade\AbstractRemoteService.cs:line
121
at AlexSoft.Desktop.Services.RemoteFacade.RemoteAdministrationService.GetAllBins()
in
D:\proj\communic\trunk_fix_not_opened\src\SmartClient\Desktop.Services\RemoteFacade\RemoteAdministrationService.cs:line
24
at AlexSoft.MPObjects.Desktop.Controllers.UseCaseBinListController.ShowBinListView(IUseCaseBinListController
controller) in
D:\proj\communic\trunk_fix_not_opened\src\SmartClient\AlexSoft.MPObjects.Desktop\Controllers\UseCaseBinListController.cs:line
95
at Microsoft.Practices.Composite.Presentation.Commands.DelegateCommand1.Execute(T
parameter)
at Microsoft.Practices.Composite.Presentation.Commands.DelegateCommand`1.System.Windows.Input.ICommand.Execute(Object
parameter)
at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource
commandSource, Boolean userInitiated)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs
e)
at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate
genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate
genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport
inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd,
InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x,
Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr
hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean&
handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate
callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object
source, Delegate method, Object args, Int32 numArgs, Delegate
catchHandler) InnerException: System.IO.IOException
Message=The read operation failed, see inner exception.
Source=System
StackTrace:
at System.Net.Security.NegotiateStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.NegotiateStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.ServiceModel.Channels.StreamConnection.Read(Byte[] buffer,
Int32 offset, Int32 size, TimeSpan timeout)
InnerException: System.ServiceModel.CommunicationObjectAbortedException
Message=The socket connection has been disposed.
Source=System.ServiceModel
StackTrace:
at System.ServiceModel.Channels.SocketConnection.ThrowIfNotOpen()
at System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer,
Int32 offset, Int32 size, TimeSpan timeout)
at System.ServiceModel.Channels.DelegatingConnection.Read(Byte[] buffer,
Int32 offset, Int32 size, TimeSpan timeout)
at System.ServiceModel.Channels.ConnectionStream.Read(Byte[] buffer,
Int32 offset, Int32 count, TimeSpan timeout)
at System.ServiceModel.Channels.ConnectionStream.Read(Byte[] buffer,
Int32 offset, Int32 count)
at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security.NegotiateStream.StartFrameHeader(Byte[] buffer,
Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.NegotiateStream.ProcessRead(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
InnerException: System.ObjectDisposedException
Message=The socket connection has been disposed. Object name: 'System.ServiceModel.Channels.SocketConnection'.
ObjectName=System.ServiceModel.Channels.SocketConnection
InnerException:
Did you try to increase the maximum message sizes in the client and server configurations?
You can also have a look at the server to see if an exception has been logged.
The parameter named MaxSerializedObjectsInGraph may also reach its limit when serializing a lot of objects.
This can happen when the server cannot serialise the result object.
Make sure there is no exceptions on serialisation.