Jump to content
zeeshandad

Phone7Spike sample application exception

Recommended Posts

I am facing exception when trying to run Phone7Spike sample for Windows Phone 7. Details of exception are as below:

CityIndex.JsonClient.ApiException was unhandled Message=The remote server returned an error: NotFound. StackTrace:

 at CityIndex.JsonClient.ApiAsyncResult`1.End()
   at CityIndex.JsonClient.Client.EndRequest[TDTO](ApiAsyncResult`1 asyncResult)
   at CIAPI.Rpc.Client.EndLogIn(ApiAsyncResult`1 asyncResult)
   at Phone7Spike.MainPage.<MainPage_Loaded>b__0(ApiAsyncResult`1 result)
   at CityIndex.JsonClient.ApiAsyncResult`1..ctor(ApiAsyncCallback`1 cb, Object state, Boolean completed, String responseText, Exception error)
   at CityIndex.JsonClient.CacheItem`1.CompleteResponse(String json, Exception exception)
   at CityIndex.JsonClient.Client.<>c__DisplayClassc`1.<EnqueueRequest>b__b(IAsyncResult ar, RequestHolder requestHolder)
   at CityIndex.JsonClient.ThrottedRequestQueue.<>c__DisplayClass3.<ProcessQueue>b__1(IAsyncResult ar)
   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()
InnerException: CityIndex.JsonClient.ApiException
  Message=The remote server returned an error: NotFound.
   InnerException: System.Net.WebException
        Message=The remote server returned an error: NotFound.
        StackTrace:
             at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
             at System.Net.Browser.ClientHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
             at CityIndex.JsonClient.Client.<>c__DisplayClassc`1.<EnqueueRequest>b__b(IAsyncResult ar, RequestHolder requestHolder)
             at CityIndex.JsonClient.ThrottedRequestQueue.<>c__DisplayClass3.<ProcessQueue>b__1(IAsyncResult ar)
             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()
        InnerException: System.Net.WebException
             Message=The remote server returned an error: NotFound.
             StackTrace:
                  at System.Net.Browser.ClientHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
                  at System.Net.Browser.ClientHttpWebRequest.<>c__DisplayClass2.<EndGetResponse>b__1(Object sendState)
                  at System.Net.Browser.AsyncHelper.<>c__DisplayClass4.<BeginOnUI>b__1(Object sendState)
                  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.Dispatcher.<>c__DisplayClass4.<FastInvoke>b__3()
                  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)

Share this post


Link to post
Guest mrdavidlaing

 

I am facing exception when trying to run Phone7Spike sample for Windows Phone 7. Details of exception are as below:

CityIndex.JsonClient.ApiException was unhandled Message=The remote server returned an error: NotFound. StackTrace:

 at CityIndex.JsonClient.ApiAsyncResult`1.End()
   at CityIndex.JsonClient.Client.EndRequest[TDTO](ApiAsyncResult`1 asyncResult)
   at CIAPI.Rpc.Client.EndLogIn(ApiAsyncResult`1 asyncResult)
   at Phone7Spike.MainPage.<MainPage_Loaded>b__0(ApiAsyncResult`1 result)
   at CityIndex.JsonClient.ApiAsyncResult`1..ctor(ApiAsyncCallback`1 cb, Object state, Boolean completed, String responseText, Exception error)
   at CityIndex.JsonClient.CacheItem`1.CompleteResponse(String json, Exception exception)
   at CityIndex.JsonClient.Client.<>c__DisplayClassc`1.<EnqueueRequest>b__b(IAsyncResult ar, RequestHolder requestHolder)
   at CityIndex.JsonClient.ThrottedRequestQueue.<>c__DisplayClass3.<ProcessQueue>b__1(IAsyncResult ar)
   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()
InnerException: CityIndex.JsonClient.ApiException
  Message=The remote server returned an error: NotFound.
   InnerException: System.Net.WebException
        Message=The remote server returned an error: NotFound.
        StackTrace:
             at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
             at System.Net.Browser.ClientHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
             at CityIndex.JsonClient.Client.<>c__DisplayClassc`1.<EnqueueRequest>b__b(IAsyncResult ar, RequestHolder requestHolder)
             at CityIndex.JsonClient.ThrottedRequestQueue.<>c__DisplayClass3.<ProcessQueue>b__1(IAsyncResult ar)
             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()
        InnerException: System.Net.WebException
             Message=The remote server returned an error: NotFound.
             StackTrace:
                  at System.Net.Browser.ClientHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
                  at System.Net.Browser.ClientHttpWebRequest.<>c__DisplayClass2.<EndGetResponse>b__1(Object sendState)
                  at System.Net.Browser.AsyncHelper.<>c__DisplayClass4.<BeginOnUI>b__1(Object sendState)
                  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.Dispatcher.<>c__DisplayClass4.<FastInvoke>b__3()
                  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)

Can you include some detail as to which API calls you are making? Perhaps a code sample?

Share this post


Link to post

 

I am facing exception when trying to run Phone7Spike sample for Windows Phone 7. Details of exception are as below:

CityIndex.JsonClient.ApiException was unhandled Message=The remote server returned an error: NotFound. StackTrace:

 at CityIndex.JsonClient.ApiAsyncResult`1.End()
   at CityIndex.JsonClient.Client.EndRequest[TDTO](ApiAsyncResult`1 asyncResult)
   at CIAPI.Rpc.Client.EndLogIn(ApiAsyncResult`1 asyncResult)
   at Phone7Spike.MainPage.<MainPage_Loaded>b__0(ApiAsyncResult`1 result)
   at CityIndex.JsonClient.ApiAsyncResult`1..ctor(ApiAsyncCallback`1 cb, Object state, Boolean completed, String responseText, Exception error)
   at CityIndex.JsonClient.CacheItem`1.CompleteResponse(String json, Exception exception)
   at CityIndex.JsonClient.Client.<>c__DisplayClassc`1.<EnqueueRequest>b__b(IAsyncResult ar, RequestHolder requestHolder)
   at CityIndex.JsonClient.ThrottedRequestQueue.<>c__DisplayClass3.<ProcessQueue>b__1(IAsyncResult ar)
   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()
InnerException: CityIndex.JsonClient.ApiException
  Message=The remote server returned an error: NotFound.
   InnerException: System.Net.WebException
        Message=The remote server returned an error: NotFound.
        StackTrace:
             at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
             at System.Net.Browser.ClientHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
             at CityIndex.JsonClient.Client.<>c__DisplayClassc`1.<EnqueueRequest>b__b(IAsyncResult ar, RequestHolder requestHolder)
             at CityIndex.JsonClient.ThrottedRequestQueue.<>c__DisplayClass3.<ProcessQueue>b__1(IAsyncResult ar)
             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()
        InnerException: System.Net.WebException
             Message=The remote server returned an error: NotFound.
             StackTrace:
                  at System.Net.Browser.ClientHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
                  at System.Net.Browser.ClientHttpWebRequest.<>c__DisplayClass2.<EndGetResponse>b__1(Object sendState)
                  at System.Net.Browser.AsyncHelper.<>c__DisplayClass4.<BeginOnUI>b__1(Object sendState)
                  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.Dispatcher.<>c__DisplayClass4.<FastInvoke>b__3()
                  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)

@mrdavidlaing Its a WinPhone7 sample application included with the Source code of CIAPI.CS.

Share this post


Link to post
Guest sky.sanders

I have found the reason of this issue. URL of the REST service was wrong. I changed the URL to following to resolve the issue: https://ciapipreprod.cityindextest9.co.uk/tradingapi

thanks for catching this. can be problematic to keep these strings current. the spikes app is soon to be supplanted by a formal test application so don’t be suprised with spike app disappears.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×