Question

Is there a way to get Client IP Address (for auditing purpose) for existing update, insert queries without adding it as a parameter.

Scenario: I have a ASP.Net application hosted over intranet and using Subsonic for executing queries. Now the application has gone very big with too many insert, update, delete statements. Now there is a requirement for Audit logs to be maintained. For this purpose I have added triggers on my tables for insert, update and delete queries and my Audit table gets updated accordingly except with IPAddress / Client Identity who have made the request. Now, I can't afford to add one extra parameter to each of these statements.

Is there any provision in SQL or ASP.Net so that I can store IP Address or Host Name with minimum efforts and changes in my existing code.

Seen SUSER_NAME, HOST_NAME but I think it will give me my Server IP Address where application is hosted.

Sorry for my English.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top