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.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 01, 2025, 08:37