Comments (6)
googling this issue landed me here, to whomever lands here in the future: I had to simply install System.Text.Json
nuget package to solve the issue.
from localstorage.
I get the same error in a Blazor web app, but with SessionStorage instead of LocalStorage, deployed on IIS. It asks for v. 4.0.1.2 but that version is not available so I can not use the workaround...
I have other Blazor apps, running on the same server, using the same version of SessionStorage that are working fine.
I think the error comes from
Microsoft.AspNetCore.Components or
Microsoft.AspNetCore.Components.Web:
dotnet/aspnetcore#22052
After upgrading ASP.NET Core Hosting Bundle on IIS, the error went away:
https://dotnet.microsoft.com/permalink/dotnetcore-current-windows-runtime-bundle-installer
Unhandled exception in circuit 'tlnELVghh4tJIeaayOZaV4CHGjBcxk4oeYq68qqsh3I'.
Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'System.Text.Json, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
File name: 'System.Text.Json, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
at Blazored.SessionStorage.SessionStorageService..ctor(IJSRuntime jSRuntime, IOptions1 options) at ResolveService(ILEmitResolverBuilderRuntimeContext , ServiceProviderEngineScope ) at Microsoft.AspNetCore.Components.ComponentFactory.<>c__DisplayClass5_0.<CreateInitializer>g__Initialize|2(IServiceProvider serviceProvider, IComponent component) at Microsoft.AspNetCore.Components.ComponentFactory.PerformPropertyInjection(IServiceProvider serviceProvider, IComponent instance) at Microsoft.AspNetCore.Components.ComponentFactory.InstantiateComponent(IServiceProvider serviceProvider, Type componentType) at Microsoft.AspNetCore.Components.RenderTree.Renderer.InstantiateComponent(Type componentType) at Microsoft.AspNetCore.Components.RenderTree.Renderer.InstantiateChildComponentOnFrame(RenderTreeFrame& frame, Int32 parentComponentId) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewComponentFrame(DiffContext& diffContext, Int32 frameIndex) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewSubtree(DiffContext& diffContext, Int32 frameIndex) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, Int32 componentId, ArrayRange
1 oldTree, ArrayRange`1 newTree)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
from localstorage.
Does this only happen is Azure Functions? I've never tried running a Blazor app from an Azure Function. How does that work?
I'm not sure what to suggest on this one, bit outside my knowledge. I've had very little experience with Functions.
from localstorage.
As there has been no more feedback on this issue I'm going to close it as we can't really do anything.
from localstorage.
Thanks Hoshani. Your suggestion solved the Blazored.LocalStorage "System.IO.FileNotFoundException: Could not load file or assembly 'System.Text.Json" issue for me.
from localstorage.
I was getting this error too. Not in Azure Functions, just a regular Blazor web app. Strange that the nuget package doesn't pull in System.Text.Json as a dependency.
from localstorage.
Related Issues (20)
- How to send facebook token(passport-facebook) from Frontend after I logged in?
- how inject in Code behind in program.cs HOT 5
- AddBlazoredLocalStorage() add public setter for options.JsonSerializerOptions HOT 2
- [Bug] LocalStorage crashes without throwing exception HOT 14
- [Bug] Impossible to make it work HOT 1
- [Bug] ASP.NET Core AggregateException on startup after injecting BlazorLocalStorage with dependency injection HOT 2
- [Bug] Performance Impact on Multiple SetItem Calls
- [Security] Consider updating Microsoft.AspNetCore.Components.Web dependency
- Net 8.0 iOS System.Text.Json.Serialization.JsonConverter System.ArgumentOutOfRangeException [Bug] HOT 1
- Unhandled exception rendering component: Please use dedicated worker for working with JavaScript interop. See https://aka.ms/dotnet-JS-interop-threads
- .Net 8 RenderMode.InteractiveServer CustomAuthenticationStateProvider[Bug] HOT 2
- Error in .NET 8 : Method not found HOT 3
- [Feature Request] Common Interface between ILocalStorageService and ISessionStorageService
- is it not working on net maui Hybrid? HOT 1
- [Bug] Lists of tuples are not being serialized correctly
- blazored.localstorage is missing NuGet package README file
- [Bug] Can't use local storage in a SSR HOT 1
- [Question] How can I use it in program.cs ? HOT 3
- Whether cookie operations can be added
- [Feature Request] An option to automatically add `location.pathname` to keys
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from localstorage.