エミュレータではなく電話デバイスでデバッグするとエラーが発生します。サーバー (IIS Express を使用して WCF/Odata を使用してホストされている) からデータが要求されるたびにエラーが表示されます。関連するコードは次のとおりです (すべてのデータ アクセスで問題が発生することに注意してください)。
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;
}
エミュレーターを使用するとすべて問題なく動作しますが、WP7 デバイスを使用すると次のような大きなエラーが発生します: この要求の処理中にエラーが発生しました
さらに良いことに、内部例外は NotFound とだけ表示されます。
スタックトレースでさえそれほど役に立ちません:
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)
誰かがこれを持っていて、以前に解決しましたか?