You need to sign in to do that
Don't have an account?
Rodolfo Calvo
Salesforce.Common.ForceException
Hello team,
I am developing a Cleansing App, I achived to log in with 0Auth2 to salesforce successfully. But at the moment to make my first query the catch statement showed me an error.
There is an unexpected error: System.AggregateException: Se han producido uno o varios errores. ---> Salesforce.Common.ForceException: The requested resource does not exist en Salesforce.Common.ServiceHttpClient.<HttpGetAsync>d__1`1.MoveNext() --- Fin del seguimiento de la pila de la excepción interna --- en System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) en System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) en System.Threading.Tasks.Task.Wait() en OAuthDemoMVC5.Controllers.SalesforceController.sqlQuery() en C:\Users\RodolfoPC\Desktop\SFAuth0\Auth0\src\DemoMVC5\OAuthDemoMVC5\Controllers\SalesforceController.cs:línea 58 ---> (Nº de excepción interna 0) Salesforce.Common.ForceException: The requested resource does not exist en Salesforce.Common.ServiceHttpClient.<HttpGetAsync>d__1`1.MoveNext()<---
This is my statement:
Can someone help me with this issue please?
Thansk and regards!
I am developing a Cleansing App, I achived to log in with 0Auth2 to salesforce successfully. But at the moment to make my first query the catch statement showed me an error.
There is an unexpected error: System.AggregateException: Se han producido uno o varios errores. ---> Salesforce.Common.ForceException: The requested resource does not exist en Salesforce.Common.ServiceHttpClient.<HttpGetAsync>d__1`1.MoveNext() --- Fin del seguimiento de la pila de la excepción interna --- en System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) en System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) en System.Threading.Tasks.Task.Wait() en OAuthDemoMVC5.Controllers.SalesforceController.sqlQuery() en C:\Users\RodolfoPC\Desktop\SFAuth0\Auth0\src\DemoMVC5\OAuthDemoMVC5\Controllers\SalesforceController.cs:línea 58 ---> (Nº de excepción interna 0) Salesforce.Common.ForceException: The requested resource does not exist en Salesforce.Common.ServiceHttpClient.<HttpGetAsync>d__1`1.MoveNext()<---
This is my statement:
var client = new ForceClient(auth.InstanceUrl, auth.AccessToken, auth.ApiVersion); Task<QueryResult<dynamic>> results = client.QueryAllAsync<dynamic>("SELECT id, FirstName, LastName, Email FROM Contact"); results.Wait(); var contacts = results.Result.Records; foreach (var contact in contacts) { //Console.WriteLine(contact.FirstName); //ViewData["Contacts"] = contact.FirstName.toString(); ViewBag.conTShow = contact.FistName.toString(); } } catch(Exception e) { //Console.Write("There is an error: " + e.ToString().Trim()); ViewBag.conError = "There is an unexpected error: " + e.ToString().Trim(); }
Can someone help me with this issue please?
Thansk and regards!
All Answers
This is the whole method I did.
Regards and thanks Andy.
It jumps directly to catch statement. It seems is not reading the code, I am not using more things than this. Of course the
Actually, please would you have a template of tutorial about what I need to do? I would like to make a data cleansing. Do you think it is possible?
https://github.com/developerforce/Force.com-Toolkit-for-NET the Creating the ForceClient is the same I am using in my app but does not work.