locked
how to implement clientsection in asp.net core 3.1 RRS feed

  • Question

  • User190551098 posted

    I tried a lot to implement clientsection but no luck

    How to implement clientsection in asp.net core i am migrating asp.net project to .net core 3.1 but wcf is not supported here and clientsection code is breaking

    below

    var appConfig = ConfigurationManager.OpenExeConfiguration(Assembly.GetExecutingAssembly().Location);
    ChannelEndpointElementCollection channelEndpointElementCollection = ((System.ServiceModel.Configuration.ClientSection)(appConfig.GetSection("system.serviceModel/client"))).Endpoints;

    any suggestion and help will be highly appreciated on how to proceed further on this.

    Friday, April 3, 2020 12:17 PM

All replies

  • User475983607 posted

    ASP.NET Core 3.1 is not compatible with the previous .NET framework.   Also, ASP.NET Core 3.1 configuration is very different from .NET.

    https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-3.1

    Friday, April 3, 2020 12:27 PM
  • User190551098 posted

    Hi

    Is there any way to implement clientsection in asp.net core if yes then what is the way

    Friday, April 3, 2020 12:29 PM
  • User190551098 posted

    Is there any way to implement clientsection yes i know it is not compatible so i am asking any way

    any suggestion and help will be highly appreciated on how to proceed further on this.

    Friday, April 3, 2020 12:40 PM
  • User475983607 posted

    If you are asking how to read an XML file/setting in ASP.NET Core then please read the configuration link in my first post.

    Friday, April 3, 2020 12:51 PM