We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

publish syncfusion to iis with .net 7 has error

HI

There is a problem after updating to .NET 7

There is no problem in the development environment, but after publishing and deployment on IIS , it thrown an error.

Meanwhile, I use Windows 11 and IIS


crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: Arg_NoDefCTor, SharedComponents.Shared.MainLayout System.MissingMethodException: Arg_NoDefCTor, SharedComponents.Shared.MainLayout at System.RuntimeType.CreateInstanceMono(Boolean , Boolean ) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean , Boolean ) at System.Activator.CreateInstance(Type , Boolean , Boolean ) at System.Activator.CreateInstance(Type , Boolean ) at System.Activator.CreateInstance(Type ) at Syncfusion.Blazor.SfComponentActivator.CreateInstance(Type ) at Microsoft.AspNetCore.Components.ComponentFactory.InstantiateComponent(IServiceProvider , Type ) at Microsoft.AspNetCore.Components.RenderTree.Renderer.InstantiateComponent(Type ) at Microsoft.AspNetCore.Components.RenderTree.Renderer.InstantiateChildComponentOnFrame(RenderTreeFrame& , Int32 ) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewComponentFrame(DiffContext& , Int32 ) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewSubtree(DiffContext& , Int32 ) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& , Int32 ) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& , Int32 , Int32 , Int32 , Int32 ) at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer , RenderBatchBuilder , Int32 , ArrayRange`1 , ArrayRange`1 ) at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder , RenderFragment , Exception& ) at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry ) at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue() blazor.webassembly.js:1:38555

u http://localhost:55/_framework/blazor.webassembly.js:1
dotNetCriticalError http://localhost:55/_framework/blazor.webassembly.js:1
_bound_js_Blazor__internal_dotNetCriticalError https://dotnet.generated.invalid/_bound_js_Blazor__internal_dotNetCriticalError:7
Ss http://localhost:55/_framework/dotnet.7.0.0.50e59kpo83.js:5
_mono_wasm_invoke_bound_function http://localhost:55/_framework/dotnet.7.0.0.50e59kpo83.js:14
<anonymous> http://localhost:55/_framework/dotnet.wasm:0
<anonymous> http://localhost:55/_framework/dotnet.wasm:98033
<anonymous> http://localhost:55/_framework/dotnet.wasm:95214
<anonymous> http://localhost:55/_framework/dotnet.wasm:28606
<anonymous> http://localhost:55/_framework/dotnet.wasm:24182
<anonymous> http://localhost:55/_framework/dotnet.wasm:1621443
<anonymous> http://localhost:55/_framework/dotnet.wasm:466438
<anonymous> http://localhost:55/_framework/dotnet.wasm:468271
<anonymous> http://localhost:55/_framework/dotnet.wasm:476638
<anonymous> http://localhost:55/_framework/dotnet.wasm:1816213
_mono_wasm_invoke_method_ref http://localhost:55/_framework/dotnet.7.0.0.50e59kpo83.js:14
BINDINGS_SetTaskSourceResultRef https://dotnet.generated.invalid/BINDINGS_SetTaskSourceResultRef:27
r http://localhost:55/_framework/dotnet.7.0.0.50e59kpo83.js:5
si http://localhost:55/_framework/dotnet.7.0.0.50e59kpo83.js:5




1 Reply

JL Joshna Lingala Uthama Reddy Lingala Syncfusion Team November 25, 2022 12:14 AM

Hi Ali,


Greetings from Syncfusion.


We are unable to replicate the issue. Please delete the bin and obj files from the application then rebuild and publish it. The issue might have occurred due to publishing using Trim. We suggest you to publish without trimming and check the issue. Refer the below links for reference


https://github.com/dotnet/aspnetcore/issues/43738

https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-publish

https://learn.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-7.0


If the issue still persists, share the below details to validate further at our end

  1. Version of Syncfusion packages.
  2. List of Syncfusion NuGet packages.
  3. Simple replication sample.
  4. List of controls used in application.


Regards,

Joshna L


Loader.
Live Chat Icon For mobile
Up arrow icon