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. C#
  4. how to run database page by IIS

how to run database page by IIS

Scheduled Pinned Locked Moved C#
asp-netdatabasewindows-admintutorialquestion
10 Posts 4 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.
  • H Offline
    H Offline
    hotthoughtguy
    wrote on last edited by
    #1

    when i m accessing database from my Default.aspx page exception raises i:e Cannot open database "MyDatabase" requested by the login. The login failed. Login failed for user '[Computer Name/ASPNET]'. any idea how to solve this?

    K N M 3 Replies Last reply
    0
    • H hotthoughtguy

      when i m accessing database from my Default.aspx page exception raises i:e Cannot open database "MyDatabase" requested by the login. The login failed. Login failed for user '[Computer Name/ASPNET]'. any idea how to solve this?

      K Offline
      K Offline
      kevinnicol
      wrote on last edited by
      #2

      Couple of options: -Add the asp.net user account as a login to the Database Server (not very secure, probalby a bad option) -Connect to the database using a connection string that uses a login account already configured on the database server.

      H 1 Reply Last reply
      0
      • K kevinnicol

        Couple of options: -Add the asp.net user account as a login to the Database Server (not very secure, probalby a bad option) -Connect to the database using a connection string that uses a login account already configured on the database server.

        H Offline
        H Offline
        hotthoughtguy
        wrote on last edited by
        #3

        and how to configure user to databse server? i am using SQL Express 2005 my connection string is string connString = @"server = .\sqlexpress; integrated security = true; database = MyDatabase";

        K 1 Reply Last reply
        0
        • H hotthoughtguy

          and how to configure user to databse server? i am using SQL Express 2005 my connection string is string connString = @"server = .\sqlexpress; integrated security = true; database = MyDatabase";

          K Offline
          K Offline
          kevinnicol
          wrote on last edited by
          #4

          Change your connection string to something like that, must make sure the user id is a user configured on the server and specify its password. Data Source=.\sqlexpress;integrated security = true;database =MyDatabase;User Id=myUsername;Password=myPassword;

          H 1 Reply Last reply
          0
          • K kevinnicol

            Change your connection string to something like that, must make sure the user id is a user configured on the server and specify its password. Data Source=.\sqlexpress;integrated security = true;database =MyDatabase;User Id=myUsername;Password=myPassword;

            H Offline
            H Offline
            hotthoughtguy
            wrote on last edited by
            #5

            how to configure user to database i am using SQL Express 2005

            H 1 Reply Last reply
            0
            • H hotthoughtguy

              how to configure user to database i am using SQL Express 2005

              H Offline
              H Offline
              hotthoughtguy
              wrote on last edited by
              #6

              i am connecting though SQL Client

              H 1 Reply Last reply
              0
              • H hotthoughtguy

                i am connecting though SQL Client

                H Offline
                H Offline
                hotthoughtguy
                wrote on last edited by
                #7

                same exception

                1 Reply Last reply
                0
                • H hotthoughtguy

                  when i m accessing database from my Default.aspx page exception raises i:e Cannot open database "MyDatabase" requested by the login. The login failed. Login failed for user '[Computer Name/ASPNET]'. any idea how to solve this?

                  N Offline
                  N Offline
                  Not Active
                  wrote on last edited by
                  #8

                  It is bad manners to post the same question to multiple forums


                  I know the language. I've read a book. - _Madmatt

                  1 Reply Last reply
                  0
                  • H hotthoughtguy

                    when i m accessing database from my Default.aspx page exception raises i:e Cannot open database "MyDatabase" requested by the login. The login failed. Login failed for user '[Computer Name/ASPNET]'. any idea how to solve this?

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

                    Using a forum as your primary learning tool is not a good idea. Read the manual (Book On Line), learn to use Google to do some research[^]

                    Never underestimate the power of human stupidity RAH

                    H 1 Reply Last reply
                    0
                    • M Mycroft Holmes

                      Using a forum as your primary learning tool is not a good idea. Read the manual (Book On Line), learn to use Google to do some research[^]

                      Never underestimate the power of human stupidity RAH

                      H Offline
                      H Offline
                      hotthoughtguy
                      wrote on last edited by
                      #10

                      alright...

                      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