Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Studio
  4. 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.

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.

Scheduled Pinned Locked Moved Visual Studio
databasesecurityhelpsysadmin
3 Posts 3 Posters 20 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Shalini Garg
    wrote on last edited by
    #1

    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

    D M 2 Replies Last reply
    0
    • S Shalini Garg

      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

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • S Shalini Garg

        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

        M Offline
        M Offline
        Mycroft Holmes
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups