I'm utilizing DeviceId to identify logs within my application. Initially, I successfully created a machine ID and other components using DeviceId.Windows. Later, I attempted to enhance this by incorporating the database connection ID whenever a user opens and subsequently closes a connection. However, when I call the function to retrieve the SqlConnectionId using the connection variable of type SqlConnection, its ConnectionString property is unexpectedly becoming null or empty."
I'm utilizing DeviceId to identify logs within my application. Initially, I successfully created a machine ID and other components using DeviceId.Windows. Later, I attempted to enhance this by incorporating the database connection ID whenever a user opens and subsequently closes a connection. However, when I call the function to retrieve the SqlConnectionId using the connection variable of type SqlConnection, its ConnectionString property is unexpectedly becoming null or empty."