Windows service using TopShelf: The underlying provider failed on Open. User logon failure

I found solution. I changed my connection string to:

  <connectionStrings><add name="MyContext" connectionString="Data Source=.\SQLEXPRESS01;Initial Catalog=MyDatabase;Integrated Security=SSPI;AttachDBFilename=C:\Program Files\Microsoft SQL Server\MSSQL15.SQLEXPRESS01\MSSQL\DATA\MyDatabase.mdf;User Id=DOMAIN\USER; Password=xxxxx" providerName="System.Data.SqlClient" /></connectionStrings>

And i also change commands to install service. Added logon user:

MyService.exe install -username:DOMAIN\USER -password:xxxx start

So, this is not exacly error, but is ok now.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top