I have a windows service running and when it tries to connect the database, I’ve got an exception : “The underlying provider failed on open”. The same service works fine on Windows Server 2008 R2 but it doesn’t work on my computer with Windows7.
I tried with integrated security and without integrated security, it is the same issue.
I tried to connect the database on windows server 2008 R2 by changing connection string but it doesn’t work.
The service use a visual studio installer(.vdproj) but I have the same error using installshield LE Spring 2012.
The database is used by an .NET MVC3 project and the connection works fine.
How can I fix this connection error ?
Thank you for your help.
The windows service didn’t have enough rights to connect the database, so I add the role “sysadmin” to the NT AUTHORITY\System user and the exception is gone !
Thank you Madushan for your help 🙂