I need to have users that update/insert information logged correctly. Currently the connection string is used as my user and a trigger on the database takes that and logs that as the person who updated the record. Obviously, everone that uses the app will have the same connection string information, but different HttpContext.User.Identity.Names. I want the connection to the database to remain the same, but I want the users HttpContext.User.Identity.Name to be logged, not the connection. Is there anyway that I can make that distinction? Such as setting the client_Identifier?

有帮助吗?

解决方案

possible Answer

Just found this Link and it looks like it could be a possible answer. Set the ClientId of the connection. Seems simple enough.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top