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. Web Development
  3. ASP.NET
  4. sql server login problem

sql server login problem

Scheduled Pinned Locked Moved ASP.NET
helpasp-netdatabasesql-serversysadmin
5 Posts 3 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
    nikhil1234
    wrote on last edited by
    #1

    i am using sql server 2005 express and i have one web site which is i have published and installed on machine but when connecting to sql server 2005 express getting error login failed mycomname/ASPNet user why not taking user name insted of aspnet how do i login my con string is as follws <add name="EMSConnectionString" connectionString="Data Source=.\sqlexpress ;Initial Catalog=EMS;intigrated security=true" providerName="System.Data.SqlClient"/>

    C G 2 Replies Last reply
    0
    • N nikhil1234

      i am using sql server 2005 express and i have one web site which is i have published and installed on machine but when connecting to sql server 2005 express getting error login failed mycomname/ASPNet user why not taking user name insted of aspnet how do i login my con string is as follws <add name="EMSConnectionString" connectionString="Data Source=.\sqlexpress ;Initial Catalog=EMS;intigrated security=true" providerName="System.Data.SqlClient"/>

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

      nikhil1234 wrote:

      why not taking user name insted of aspnet how do i login my con string is as follws

      Your web application is running in the context of the ASPNET user. Therefore, when you use integrated security you will log in with the credentials of the user that your process is running as. This is the correct functionality. You must grant the appropriate access to the ASPNET user to the database. Possibly the reason you did not see this when you were developing the web site is that Visual Studio has its own built in Web Server that uses your credentials. When you deploy to IIS you use the credentials IIS uses.

      *Developer Day Scotland - Free community conference Delegate Registration Open

      1 Reply Last reply
      0
      • N nikhil1234

        i am using sql server 2005 express and i have one web site which is i have published and installed on machine but when connecting to sql server 2005 express getting error login failed mycomname/ASPNet user why not taking user name insted of aspnet how do i login my con string is as follws <add name="EMSConnectionString" connectionString="Data Source=.\sqlexpress ;Initial Catalog=EMS;intigrated security=true" providerName="System.Data.SqlClient"/>

        G Offline
        G Offline
        Greg Chelstowski
        wrote on last edited by
        #3

        intigrated security=true integrated security=true Try that.

        var question = (_2b || !(_2b));

        C 1 Reply Last reply
        0
        • G Greg Chelstowski

          intigrated security=true integrated security=true Try that.

          var question = (_2b || !(_2b));

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

          It is true by default, so that typo would likely have been ignored.

          *Developer Day Scotland - Free community conference Delegate Registration Open

          G 1 Reply Last reply
          0
          • C Colin Angus Mackay

            It is true by default, so that typo would likely have been ignored.

            *Developer Day Scotland - Free community conference Delegate Registration Open

            G Offline
            G Offline
            Greg Chelstowski
            wrote on last edited by
            #5

            Fair enough, I probably should have read the question first, but that typo kinda blinded me straight on. And thanks, I didn't know Integrated security was true by default.

            var question = (_2b || !(_2b));

            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