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. Database & SysAdmin
  3. Database
  4. SqlException - 'Login failed for user (user)'

SqlException - 'Login failed for user (user)'

Scheduled Pinned Locked Moved Database
helpcsharpdatabaselounge
3 Posts 2 Posters 0 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.
  • N Offline
    N Offline
    nlindley7
    wrote on last edited by
    #1

    Hello, I know this is a very common connectivity error but I am really stuck here. I am currently trying to access a DB via a BindingNaviagator control via .NET. I know the connection string is 100% correct as when I do the preview data on my TableAdapter the data comes through. When I go to fire the program and access these records, I get the SqlException - Login failed for user (user) error. Like I said I know this is a pretty general error, but any advice on where to continue looking would be greatly appreciated. Thanks In Advance -Nate Lindley- .NET Aficionado

    C 1 Reply Last reply
    0
    • N nlindley7

      Hello, I know this is a very common connectivity error but I am really stuck here. I am currently trying to access a DB via a BindingNaviagator control via .NET. I know the connection string is 100% correct as when I do the preview data on my TableAdapter the data comes through. When I go to fire the program and access these records, I get the SqlException - Login failed for user (user) error. Like I said I know this is a pretty general error, but any advice on where to continue looking would be greatly appreciated. Thanks In Advance -Nate Lindley- .NET Aficionado

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      That would suggest that the account the preview in Visual Studio is using is different to the account your application is using. This is possible if you are using a trusted connection as the account that will be used to access SQL Server will be the account of the currently running process. I suggest you find out what account your application is using and set up the appropriate permissions on SQL Server, or change the account your application is running in.


      Upcoming Scottish Developers events: * UK Security Evangelists On Tour (2nd November, Edinburgh) * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog

      N 1 Reply Last reply
      0
      • C Colin Angus Mackay

        That would suggest that the account the preview in Visual Studio is using is different to the account your application is using. This is possible if you are using a trusted connection as the account that will be used to access SQL Server will be the account of the currently running process. I suggest you find out what account your application is using and set up the appropriate permissions on SQL Server, or change the account your application is running in.


        Upcoming Scottish Developers events: * UK Security Evangelists On Tour (2nd November, Edinburgh) * Developer Day Scotland: are you interested in speaking or attending? My: Website | Blog

        N Offline
        N Offline
        nlindley7
        wrote on last edited by
        #3

        I was thinking the same thing but I did the connection over and it still didnt work. I came to the conclusion that it was the DB settings not letting it connect because I actually created the DB on the server as opposed to the System Admin. So I had the SA make a new DB and it worked like a charm. I am not sure what settings were causing the remote connections to not be allowed but its all good now. Thanks for the response. Big Pimpin, Spendin Gs Nathan Lindley, .NET Aficionado

        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