Localhost Url creating JSON Error when trying to
When I use the following FileManagerAjaxSettings Url (Note that my Controller is called "DefaultController"):
<SfFileManager TValue="FileManagerDirectoryContent">
<FileManagerAjaxSettings Url="https://localhost:7102/api/Default/AzureFileOperations">
</FileManagerAjaxSettings>
<FileManagerEvents TValue="FileManagerDirectoryContent" BeforeImageLoad="BeforeImageLoadEvent" BeforeDownload="BeforeDownloadEvent" OnSend="SendEvent"></FileManagerEvents>
</SfFileManager>
I get the following JSON error:
blazor.server.js:1 [2023-11-14T00:34:26.031Z] Error: System.Text.Json.JsonException: '<' is an invalid start of a value. Path: $ | LineNumber: 2 | BytePositionInLine: 0.
---> System.Text.Json.JsonReaderException: '<' is an invalid start of a value. LineNumber: 2 | BytePositionInLine: 0.
at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes)
at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker)
at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first)
at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
at System.Text.Json.Utf8JsonReader.Read()
at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
--- End of inner exception stack trace ---
at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)
at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 utf8Json, JsonTypeInfo jsonTypeInfo, Nullable`1 actualByteCount)
at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo jsonTypeInfo)
at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
at Syncfusion.Blazor.FileManager.SfFileManager`1.GetData[T](String action, T[] data, T targetData, String path, FileManagerAjaxSettings ajaxSettings, Boolean showHiddenItems, String name, String newName, String[] names, Boolean caseSensitive, String searchString, String targetPath, String[] renameFiles, Boolean showFileExtension)
at Syncfusion.Blazor.FileManager.SfFileManager`1.OnAfterRenderAsync(Boolean firstRender)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
Hi Christopher,
Greetings from Syncfusion support.
We have prepared sample with your provided details and validated reported problem with the Syncfusion Blazor File Manager component. But we were unable to replicate your reported issue in our end. We have attached the issue validation sample, please check it once on your end.
If the issue persists, share us the issue replicating sample or replicate your reported issue in the attached sample. It will be help us to provide you the prompt solution.
Regards,
Muthukrishnan K
Attachment: FileManagerAzure_6bd4022d.zip
- 1 Reply
- 2 Participants
-
CM Christopher M Nichols
- Nov 14, 2023 12:38 AM UTC
- Nov 20, 2023 12:29 PM UTC