There is a problem when debugging step by step.
I have a simple button onclick method
private void Button_Click(object sender, RoutedEventArgs e)
{
var ee = sender as Button;
var r = new Random();
if (ee != null)
ee.Foreground= new SolidColorBrush(Color.FromArgb((byte)r.Next(255), (byte)r.Next(255), (byte)r.Next(255), (byte)r.Next(255)));
}
- I set breakpoint on "var ee = sender as Button;"
- When I stop on this breakpoint and wait some time, phone is disconnected from WP7Explorer.
-
Now I press F5, and see about three times this exception (I press "OK", next F5, and I see it again):
System.ServiceModel.FaultException1 was unhandled
Message=Invalid application session ID
Action=http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher/fault
StackTrace:
at System.ServiceModel.DiagnosticUtility.ExceptionUtility.BuildMessage(Exception x)
at System.ServiceModel.DiagnosticUtility.ExceptionUtility.LogException(Exception x)
at System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperWarning(Exception e)
at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
at System.ServiceModel.ClientBase1.ChannelBase1.EndInvoke(String methodName, Object[] args, IAsyncResult result)
at IsolatedStorageExplorer.ApplicationOperationsService.ApplicationOperationsServiceClient.ApplicationOperationsServiceClientChannel.EndGetNextOperation(IAsyncResult result)
at IsolatedStorageExplorer.ApplicationOperationsService.ApplicationOperationsServiceClient.IsolatedStorageExplorer.ApplicationOperationsService.IApplicationOperationsService.EndGetNextOperation(IAsyncResult result)
at IsolatedStorageExplorer.ApplicationOperationsService.ApplicationOperationsServiceClient.OnEndGetNextOperation(IAsyncResult result)
at System.ServiceModel.ClientBase1.OnAsyncCallCompleted(IAsyncResult result)
at System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously, Exception exception)
at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.CallComplete(Boolean completedSynchronously, Exception exception)
at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.FinishSend(IAsyncResult result, Boolean completedSynchronously)
at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.SendCallback(IAsyncResult result)
at System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.AsyncResult.Complete(Boolean completedSynchronously, Exception exception)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.OnGetResponse(IAsyncResult result)
at System.Net.Browser.ClientHttpWebRequest.<>c__DisplayClassa.<InvokeGetResponseCallback>b__8(Object state2)
at System.Threading.ThreadPool.WorkItem.doWork(Object o)
at System.Threading.Timer.ring()
I've attached this sample project.