Connection String Using a Domain User?

后端 未结 5 1514
鱼传尺愫
鱼传尺愫 2020-12-15 16:08

Previously for all our asp.net applications we have been using a sysadmin user within SQL Server to connect and add/update/delete/get data. Our SQL Admin wants to delete tha

5条回答
  •  不思量自难忘°
    2020-12-15 16:56

    If you want to use different user account then the logged in user you have two options.

    Option 1

    You can add the user to Application pool Identity.

    For this go to advance setting of application pool and edit the identity to use the user you want.

    Option 2

    Add this in Web config:

    
    

    And use this connection stirng:

    
    

    For More Details See: https://msdn.microsoft.com/en-us/library/134ec8tc.aspx

    Also found another good article here https://www.codeproject.com/tips/520341/implement-impersonation-in-asp-net

提交回复
热议问题