I am trying to read an object stored in azure configuration on azure portal in blazor server app.
and the code in program.cs file is
var appEnvironment = builder.Configuration["AppSettings_Environment"].ToString();
var userRolePolicySection = builder.Configuration.GetSection("AppSettings_UserRolePolicy").Get<UserRolePolicyConfiguration>();
List<String> userRoleList = userRolePolicySection.GetEnvironmentUserRoleList(appEnvironment);
List<UserRolePolicy> userPolicyList = userRolePolicySection.UserRolePolicy;
I have created a class UserRolePolicyConfiguration. but the app is giving error as HTTP Error 500.30 - ASP.NET Core app failed to start. Plese suggest a solution
i am expecting to get the object in userRolePolicySection parameter