Error in ASP.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dwadish
    New Member
    • Nov 2006
    • 129

    Error in ASP.net

    Guys i have an error with my asp.net application


    The error line is sqlcommand.open

    the error message shown bekow

    Login failed for user 'NT AUTHORITY\NETWO RK SERVICE'.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.Sql Client.SqlExcep tion: Login failed for user 'NT AUTHORITY\NETWO RK SERVICE'.

    Source Error:


    Any one can help me?


    Thanx in advance
  • gomzi
    Contributor
    • Mar 2007
    • 304

    #2
    Originally posted by dwadish
    Guys i have an error with my asp.net application


    The error line is sqlcommand.open

    the error message shown bekow

    Login failed for user 'NT AUTHORITY\NETWO RK SERVICE'.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.Sql Client.SqlExcep tion: Login failed for user 'NT AUTHORITY\NETWO RK SERVICE'.

    Source Error:


    Any one can help me?


    Thanx in advance
    Shouldn't you be opening your connection instead of the sqlcommand!!?
    This error may occur if the username and password aren't right.

    Comment

    • Nitinkcv
      New Member
      • Mar 2007
      • 65

      #3
      Originally posted by dwadish
      Guys i have an error with my asp.net application


      The error line is sqlcommand.open

      the error message shown bekow

      Login failed for user 'NT AUTHORITY\NETWO RK SERVICE'.
      Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

      Exception Details: System.Data.Sql Client.SqlExcep tion: Login failed for user 'NT AUTHORITY\NETWO RK SERVICE'.

      Source Error:


      Any one can help me?


      Thanx in advance

      Hi,

      I think u might have not included aspnet as a new user for the database u are using. please use the sql management studio to do this if u already havent done so.


      Thanks

      Comment

      • dwadish
        New Member
        • Nov 2006
        • 129

        #4
        Originally posted by Nitinkcv
        Hi,

        I think u might have not included aspnet as a new user for the database u are using. please use the sql management studio to do this if u already havent done so.


        Thanks

        How i can do this plz help me

        Comment

        • Frinavale
          Recognized Expert Expert
          • Oct 2006
          • 9749

          #5
          Originally posted by dwadish
          How i can do this plz help me
          Dwadish, check out this article on how to use a database in your program. It may help you.

          -Frinny

          Comment

          • Plater
            Recognized Expert Expert
            • Apr 2007
            • 7872

            #6
            Your hosting computer is trying to validate itself to the SQL databse with the user "'NT AUTHORITY\NETWO RK SERVICE'" or rather just "NETWORK SERVICE".
            (The newer versions of IIS use network service and not aspnet as the user for asp.net pages)

            You will need to add that user to your database logins, or change your connection string to have a manually supplied username/password and add THOSE to your database logins.

            All of which I am sure is explained in the article frinny linked to

            Comment

            • dwadish
              New Member
              • Nov 2006
              • 129

              #7
              --------------------------------------------------------------------------------

              Friend
              I know how to connect to a database and it's connection string also

              but this error not from the connection string.

              give a good solution.

              Thanx for the reply

              --------------------------------------------------------------------------------

              Comment

              • Plater
                Recognized Expert Expert
                • Apr 2007
                • 7872

                #8
                You missed the point.
                The error is being caused because your SQL database is rejecting your conenction request ( the .OPEN() call) because it does not have a login entry for the user: "NETWORK SERVICE". Which is how your asp.net project will try and validate itself as.

                Please read the article linked above

                Comment

                • dwadish
                  New Member
                  • Nov 2006
                  • 129

                  #9
                  Thanx to frinny for the greate help.

                  Comment

                  • Frinavale
                    Recognized Expert Expert
                    • Oct 2006
                    • 9749

                    #10
                    Originally posted by dwadish
                    Thanx to frinny for the greate help.

                    Glad to help!

                    -Frinny

                    Comment

                    Working...