Starts in:
0 DAY
12 HRS
56 MIN
57 SEC
Starts in:
0 D
12 H
56 M
57 S
Open Closed

Modify SQL Connection Process #3540


User avatar
0
viswajwalith created
  • ABP Framework version: v5.1.3
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

We have some custom requirement of passing the Token to the the SQL Connection while connection establishment. Can you please guide us where we can find the relevant override?

    SqlConnection connection = new SqlConnection();
    connection.ConnectionString = Configuration.GetConnectionString("defaultConnection");
    connection.AccessToken = authTokenService.GetToken().Result;
    

4 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Is this work for you? https://github.com/dotnet/efcore/issues/11928#issuecomment-673058635

  • User Avatar
    0
    viswajwalith created

    Hi,

    Is this work for you? https://github.com/dotnet/efcore/issues/11928#issuecomment-673058635

    Thanks for the link, We will check and get back to you with update

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    ok.

  • User Avatar
    0
    viswajwalith created

    Basically we need to connect to SQL MI with managed identity, so thought of modifying the connection method to accommodate the same, but .Net 6 is having native support for the same so updating to Sql.Data.Client to 5.1 fulfilled our requirement.

    Thanks for the support, I am closing the issue from my side.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06