Using GetSheet method returns Unexpected character encountered while parsing value: <. Path '', line
This is just using the basic code that is provided in the Github documentation.
Stack Trace;
at Smartsheet.Api.Internal.AbstractResources.HandleError(HttpResponse response)
at Smartsheet.Api.Internal.AbstractResources.GetResource[T](String path, Type objectClass)
at Smartsheet.Api.Internal.SheetResourcesImpl.GetSheet(Int64 sheetId, IEnumerable`1 includes, IEnumerable`1 excludes, IEnumerable`1 rowIds, IEnumerable`1 rowNumbers, IEnumerable`1 columnIds, Nullable`1 pageSize, Nullable`1 page, Nullable`1 ifVersionAfter, Nullable`1 level)
at Smartsheet.Api.Internal.SheetResourcesImpl.GetSheet(Int64 sheetId, IEnumerable`1 includes, IEnumerable`1 excludes, IEnumerable`1 rowIds, IEnumerable`1 rowNumbers, IEnumerable`1 columnIds, Nullable`1 pageSize, Nullable`1 page)
at FederalGrantsExport.Program.Main(String[] args) in C:\Working\FederalGrantsExport\FederalGrantsExport\Program.cs:line 28
at System.AppDomain._nExecuteAssembly(RuntimeAssembly 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.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Answers
-
Hello @cmiller
Upon reviewing this, the issue may be relevant to a firewall/proxy server blocking the API call. Try by putting the following into app.config file (just below the configSections).
<defaultProxy useDefaultCredentials="true"></defaultProxy>
</system.net>
Let me know if this helps!
Cheers,
Krissia
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 495 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives