MatthewKing / DeviceId

A simple library providing functionality to generate a 'device ID' that can be used to uniquely identify a computer.
MIT License
722 stars 118 forks source link

Connection string property vanishes , @DeviceId.SqlServer #88

Open SreeVardhanTulluri opened 4 days ago

SreeVardhanTulluri commented 4 days ago

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."

Screenshot 2024-07-05 182152
SreeVardhanTulluri commented 4 days ago

Before calling above function image after calling above function image

MatthewKing commented 4 days ago

Thanks for the bug report. This should be fixed in 6.7.0, have a try and let me know how it goes. Cheers