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
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives