Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Blazor C# Error: One or more errors occurred. (Value cannot be null. (Parameter 'value'))

$
0
0

I am new to Blazor Development. Does any know how to solve this issue? I only have this issue if I login as a user. When I try to step into the code. It stop after the ApplicationDbContext class and throw this error after the options.UseSqlServer(connectionString)). Your help is greatly appreciate it. Below is the error I got. Let me know if you guys need anything else.

var connectionString = builder.Configuration.GetConnectionString("DefaultConnection") ?? throw new InvalidOperationException("Connection string 'DefaultConnection' not found.");builder.Services.AddDbContext<ApplicationDbContext>(options =>options.UseSqlServer(connectionString));builder.Services.AddDatabaseDeveloperPageExceptionFilter();

Error: One or more errors occurred. (Value cannot be null. (Parameter 'value'))at Jn (c:\Users\myuser\Documents\Visual Studio 2022\Projects\HmongCenterGB\HmongCenterGB\HmongCenterGB\wwwroot_framework\https:\raw.githubusercontent.com\dotnet\runtime\5535e31a712343a63f5d7d796cd874e563e5ac14\src\mono\wasm\runtime\marshal-to-js.ts:349:18)at Ul (c:\Users\myuser\Documents\Visual Studio 2022\Projects\HmongCenterGB\HmongCenterGB\HmongCenterGB\wwwroot_framework\https:\raw.githubusercontent.com\dotnet\runtime\5535e31a712343a63f5d7d796cd874e563e5ac14\src\mono\wasm\runtime\marshal-to-js.ts:306:28)at wasm://wasm/00b1e8b6:wasm-function[350]:0x1facaat wasm://wasm/00b1e8b6:wasm-function[246]:0x1bf8bat wasm://wasm/00b1e8b6:wasm-function[239]:0xf172at wasm://wasm/00b1e8b6:wasm-function[307]:0x1e7e4at wasm://wasm/00b1e8b6:wasm-function[328]:0x1efdaat wasm://wasm/00b1e8b6:wasm-function[218]:0xcfecat wasm://wasm/00b1e8b6:wasm-function[774]:0x440adat e. (https://localhost:7030/_framework/dotnet.runtime.8.0.0.nk3t6c0vmt.js:3:214976) {superStack: {…}, stack: , message: 'One or more errors occurred. (Value cannot be null. (Parameter 'value'))', Symbol(wasm js_owned_gc_handle): 86}

I step into the code, but it does not give me any information to give this issue resolve. What I expect to happen was. When the user login it will go straight to the home page. It was able to navigate to the home page, but the code within the home page was never trigger at all. It just throw this error.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>