Getting "Value Does not fall within Expected Range" Exception
Hello All,
I have Created a Console App in Dot Net Using C# SDK for Smartsheet API.
And Successfully Retrieved the Sheets that are accessed to me using ListSheets() method in my Local system.
But the same method Returns Exception at the Production Server like "Value does not fall within the expected range". in the Line
PaginatedResult<Sheet> sheets = smartsheet.SheetResources.ListSheets(null,null, null);
I used same token for both environment.
Am I missed Something?
Exception:
Unhandled exception. Smartsheet.Api.SmartsheetException: Value does not fall within the expected range.
at Smartsheet.Api.Internal.Http.DefaultHttpClient.Request(HttpRequest smartsheetRequest)
at Smartsheet.Api.Internal.AbstractResources.ListResourcesWithWrapper[T](String path)
at Smartsheet.Api.Internal.SheetResourcesImpl.ListSheets(IEnumerable`1 includes, PaginationParameters paging, Nullable`1 modifiedSince)
at SmartsheetInterface.Program.Main(String[] args) in C:\SmartsheetInterface\Program.cs:line 37
Any help would be greatly appreciated!
Best Answer
-
Hi, It looks like you have the right syntax for C#. I wonder if you can run the List Sheets command just in Curl to isolate it and see if that gives you a response? Then you would know whether it's some other issue or your request through the SDK.
Answers
-
Hi, It looks like you have the right syntax for C#. I wonder if you can run the List Sheets command just in Curl to isolate it and see if that gives you a response? Then you would know whether it's some other issue or your request through the SDK.
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.4K Get Help
- 364 Global Discussions
- 202 Industry Talk
- 430 Announcements
- 4.4K Ideas & Feature Requests
- 137 Brandfolder
- 129 Just for fun
- 128 Community Job Board
- 446 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 284 Events
- 35 Webinars
- 7.3K Forum Archives