Web Installer Issue -Not able to connect to DB -The server principal "DOMAIN\MACHINENAME$" is not able to access the database "<DB NAME>" under the current security context.
-
Hi, I am getting below error while generating the SQL scripts using a web installer with Integrated security as true /Windows authentication mode on. It works perfectly fine with SQL authentication mode. The server principal "DOMAIN\MACHINENAME$" is not able to access the database "" under the current security context. Regards
-
Hi, I am getting below error while generating the SQL scripts using a web installer with Integrated security as true /Windows authentication mode on. It works perfectly fine with SQL authentication mode. The server principal "DOMAIN\MACHINENAME$" is not able to access the database "" under the current security context. Regards
Windows authentication uses the account the code is running under, which, in an installer, can be the System account. System is just another name for the machine's own account. Yes, even the machine running Windows has to log into Windows. Either the security on the SQL Server has to be modified to allow the machine account to login to the database, or you do NOT use IntegratedSecurity in your connection string. You will, of course, have to ask for the credentials to use during install and put those credentials into your connection string when running the SQL script on the server.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak -
Hi, I am getting below error while generating the SQL scripts using a web installer with Integrated security as true /Windows authentication mode on. It works perfectly fine with SQL authentication mode. The server principal "DOMAIN\MACHINENAME$" is not able to access the database "" under the current security context. Regards
That is because it is using the windows account of the web server which will be very restricted.
Never underestimate the power of human stupidity - RAH I'm old. I know stuff - JSOP