0

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

Harshitha
  • 3,784
  • 2
  • 4
  • 9
  • Could you please share the `appsettings.json` file and the configuration in Azure portal as well. – Harshitha Aug 16 '23 at 06:02
  • Please share your `appsettings.json` file, so that it will be easy to make out what you are missing.Also please share the configuration which you haev set in `Azure Portal`. – Harshitha Aug 28 '23 at 08:23
  • To know more about the issue, change the `stdoutLogEnabled` value to true in web.config file (available in the deployed folder `site\wwwroot` in KUDU console. – Harshitha Aug 28 '23 at 08:26

0 Answers0