ASP.NET database won't connect...

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default ASP.NET database won't connect...

    I setup a asp.net project running on [url]http://localhost/[/url] which connects to a
    database on another server running sqlserver...

    I was able to connect to the database and create my application no problem.

    The sqlserver database server had windows 2000 without any SP's or updates.
    This was no problem and even though the OS hadn't the .net framework
    installed, everything worked fine.

    the requirements for that sqlserver database server have since changed, and
    windows update was visited to get all the updates, including the latest SP's
    as well as the .net framework. I also installed the remote only debugging
    for VS.net on this server so that I'm also able to use this as a IIS
    server...

    Anyway, back to my problem, since these updates the asp.net application i
    run from my machine, whcih connects to this database server, has stopped
    working with error "SQL Server does not exist or access denied" on the line
    where the .Open() is called on the ADO.net database connection object.

    Any ideas???


    Daniel Bass Guest

  2. Similar Questions and Discussions

    1. cant connect to sql database
      i am using server2003 with iis6 cf 7.0.1 and sql server 2005 this is the error retun i get in my cf admin Connection verification failed for...
    2. how to connect to a database using asp
      I am now beginning to work with ASP and SQL server, on IIS. Having worked with PHP and MySQL on Apache I am familiar with how all 3 should be set up...
    3. How to use “RDS.Connect” to connect to a MS Access database?
      The example I am working from uses the following code which does not work: RDS.Connect = "Provider='sqloledb';Integrated Security='SSPI';Initial ...
    4. How can I connect this database?
      One of my friend has a program written with delphi and which has an interface to add some data. The program use sybase to add data values to the...
    5. connect to database
      hi, i have db2 server installed and attach a remote database, i want to open the command window , then i do connect to xx user xxx, i fill in the...
  3. #2

    Default Re: ASP.NET database won't connect...

    It sounds like one of the updates tightened the security on your SQL database.
    You'll want to verify that the account you are using for the data still has
    sufficient rights.

    Is it possible that the sa account or its password was changed?

    "Daniel Bass" <danielbassNOJUNK@MAILpostmaster.co.uk> wrote in message
    news:eO9GBgBXDHA.2200@TK2MSFTNGP09.phx.gbl...
    I setup a asp.net project running on [url]http://localhost/[/url] which connects to a
    database on another server running sqlserver...

    I was able to connect to the database and create my application no problem.

    The sqlserver database server had windows 2000 without any SP's or updates.
    This was no problem and even though the OS hadn't the .net framework
    installed, everything worked fine.

    the requirements for that sqlserver database server have since changed, and
    windows update was visited to get all the updates, including the latest SP's
    as well as the .net framework. I also installed the remote only debugging
    for VS.net on this server so that I'm also able to use this as a IIS
    server...

    Anyway, back to my problem, since these updates the asp.net application i
    run from my machine, whcih connects to this database server, has stopped
    working with error "SQL Server does not exist or access denied" on the line
    where the .Open() is called on the ADO.net database connection object.

    Any ideas???



    Ken Cox [Microsoft MVP] Guest

  4. #3

    Default Re: ASP.NET database won't connect...

    The strange thing is that when i connect to it via the server explorer it
    still works, and I'm able to view tables, edit data etc etc...

    If i delete my connection, recreate it and rename it, I get the same result.
    If I connect to the database via classic ASP, it works fine...

    I've checked the sa login but appears it's still okay.



    "Ken Cox [Microsoft MVP]" <BANSPAMken_cox@sympatico.ca> wrote in message
    news:ODWGphBXDHA.652@TK2MSFTNGP10.phx.gbl...
    > It sounds like one of the updates tightened the security on your SQL
    database.
    > You'll want to verify that the account you are using for the data still
    has
    > sufficient rights.
    >
    > Is it possible that the sa account or its password was changed?
    >
    > "Daniel Bass" <danielbassNOJUNK@MAILpostmaster.co.uk> wrote in message
    > news:eO9GBgBXDHA.2200@TK2MSFTNGP09.phx.gbl...
    > I setup a asp.net project running on [url]http://localhost/[/url] which connects to a
    > database on another server running sqlserver...
    >
    > I was able to connect to the database and create my application no
    problem.
    >
    > The sqlserver database server had windows 2000 without any SP's or
    updates.
    > This was no problem and even though the OS hadn't the .net framework
    > installed, everything worked fine.
    >
    > the requirements for that sqlserver database server have since changed,
    and
    > windows update was visited to get all the updates, including the latest
    SP's
    > as well as the .net framework. I also installed the remote only debugging
    > for VS.net on this server so that I'm also able to use this as a IIS
    > server...
    >
    > Anyway, back to my problem, since these updates the asp.net application i
    > run from my machine, whcih connects to this database server, has stopped
    > working with error "SQL Server does not exist or access denied" on the
    line
    > where the .Open() is called on the ADO.net database connection object.
    >
    > Any ideas???
    >
    >
    >

    Daniel Bass Guest

  5. #4

    Default Re: ASP.NET database won't connect...

    Daniel,

    What does your connection string look like?

    Benny Tordrup


    "Daniel Bass" <danielbassNOJUNK@MAILpostmaster.co.uk> skrev i en meddelelse
    news:eO9GBgBXDHA.2200@TK2MSFTNGP09.phx.gbl...
    > I setup a asp.net project running on [url]http://localhost/[/url] which connects to a
    > database on another server running sqlserver...
    >
    > I was able to connect to the database and create my application no
    problem.
    >
    > The sqlserver database server had windows 2000 without any SP's or
    updates.
    > This was no problem and even though the OS hadn't the .net framework
    > installed, everything worked fine.
    >
    > the requirements for that sqlserver database server have since changed,
    and
    > windows update was visited to get all the updates, including the latest
    SP's
    > as well as the .net framework. I also installed the remote only debugging
    > for VS.net on this server so that I'm also able to use this as a IIS
    > server...
    >
    > Anyway, back to my problem, since these updates the asp.net application i
    > run from my machine, whcih connects to this database server, has stopped
    > working with error "SQL Server does not exist or access denied" on the
    line
    > where the .Open() is called on the ADO.net database connection object.
    >
    > Any ideas???
    >
    >

    Benny Tordrup Guest

  6. #5

    Default Re: ASP.NET database won't connect...

    Does this mean i have to set up an "asp.net" account?

    I've not seen any place to do this, how is it done?

    thanks.
    Dan


    "Kevin Spencer" <kevin@takempis.com> wrote in message
    news:%23vq9tMCXDHA.2484@TK2MSFTNGP09.phx.gbl...
    > Your server explorer runs under a different account than ASP.Net.
    >
    > --
    > HTH,
    >
    > Kevin Spencer
    > Microsoft MVP
    > .Net Developer
    > [url]http://www.takempis.com[/url]
    > Complex things are made up of
    > lots of simple things.
    >
    > "Daniel Bass" <danielbassNOJUNK@MAILpostmaster.co.uk> wrote in message
    > news:u6frlmBXDHA.3444@tk2msftngp13.phx.gbl...
    > > The strange thing is that when i connect to it via the server explorer
    it
    > > still works, and I'm able to view tables, edit data etc etc...
    > >
    > > If i delete my connection, recreate it and rename it, I get the same
    > result.
    > > If I connect to the database via classic ASP, it works fine...
    > >
    > > I've checked the sa login but appears it's still okay.
    > >
    > >
    > >
    > > "Ken Cox [Microsoft MVP]" <BANSPAMken_cox@sympatico.ca> wrote in message
    > > news:ODWGphBXDHA.652@TK2MSFTNGP10.phx.gbl...
    > > > It sounds like one of the updates tightened the security on your SQL
    > > database.
    > > > You'll want to verify that the account you are using for the data
    still
    > > has
    > > > sufficient rights.
    > > >
    > > > Is it possible that the sa account or its password was changed?
    > > >
    > > > "Daniel Bass" <danielbassNOJUNK@MAILpostmaster.co.uk> wrote in message
    > > > news:eO9GBgBXDHA.2200@TK2MSFTNGP09.phx.gbl...
    > > > I setup a asp.net project running on [url]http://localhost/[/url] which connects
    to
    > a
    > > > database on another server running sqlserver...
    > > >
    > > > I was able to connect to the database and create my application no
    > > problem.
    > > >
    > > > The sqlserver database server had windows 2000 without any SP's or
    > > updates.
    > > > This was no problem and even though the OS hadn't the .net framework
    > > > installed, everything worked fine.
    > > >
    > > > the requirements for that sqlserver database server have since
    changed,
    > > and
    > > > windows update was visited to get all the updates, including the
    latest
    > > SP's
    > > > as well as the .net framework. I also installed the remote only
    > debugging
    > > > for VS.net on this server so that I'm also able to use this as a IIS
    > > > server...
    > > >
    > > > Anyway, back to my problem, since these updates the asp.net
    application
    > i
    > > > run from my machine, whcih connects to this database server, has
    stopped
    > > > working with error "SQL Server does not exist or access denied" on the
    > > line
    > > > where the .Open() is called on the ADO.net database connection object.
    > > >
    > > > Any ideas???
    > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Daniel Bass Guest

  7. #6

    Default Re: ASP.NET database won't connect...

    Daniel,

    Apply the following commands in Query Analyzer (replace <ComputerName> with
    the name of the SQL Server Computer and <DatabaseName> with the name of the
    database that ASP.NET needs access to:

    <SQL>
    Exec sp_grantlogin '<ComputerName>\ASPNET'
    go

    use [<DatabaseName>]
    go

    EXEC sp_grantdbaccess '<ComputerName>\ASPNET'
    go

    exec sp_addrolemember @rolename='db_owner', @membername=
    '<ComputerName>\ASPNET'
    go
    </SQL>

    Best regards,

    Benny Tordrup

    "Daniel Bass" <danielbassNOJUNK@MAILpostmaster.co.uk> skrev i en meddelelse
    news:uIQz4oCXDHA.2444@tk2msftngp13.phx.gbl...
    > Does this mean i have to set up an "asp.net" account?
    >
    > I've not seen any place to do this, how is it done?
    >
    > thanks.
    > Dan
    >
    >
    > "Kevin Spencer" <kevin@takempis.com> wrote in message
    > news:%23vq9tMCXDHA.2484@TK2MSFTNGP09.phx.gbl...
    > > Your server explorer runs under a different account than ASP.Net.
    > >
    > > --
    > > HTH,
    > >
    > > Kevin Spencer
    > > Microsoft MVP
    > > .Net Developer
    > > [url]http://www.takempis.com[/url]
    > > Complex things are made up of
    > > lots of simple things.
    > >
    > > "Daniel Bass" <danielbassNOJUNK@MAILpostmaster.co.uk> wrote in message
    > > news:u6frlmBXDHA.3444@tk2msftngp13.phx.gbl...
    > > > The strange thing is that when i connect to it via the server explorer
    > it
    > > > still works, and I'm able to view tables, edit data etc etc...
    > > >
    > > > If i delete my connection, recreate it and rename it, I get the same
    > > result.
    > > > If I connect to the database via classic ASP, it works fine...
    > > >
    > > > I've checked the sa login but appears it's still okay.
    > > >
    > > >
    > > >
    > > > "Ken Cox [Microsoft MVP]" <BANSPAMken_cox@sympatico.ca> wrote in
    message
    > > > news:ODWGphBXDHA.652@TK2MSFTNGP10.phx.gbl...
    > > > > It sounds like one of the updates tightened the security on your SQL
    > > > database.
    > > > > You'll want to verify that the account you are using for the data
    > still
    > > > has
    > > > > sufficient rights.
    > > > >
    > > > > Is it possible that the sa account or its password was changed?
    > > > >
    > > > > "Daniel Bass" <danielbassNOJUNK@MAILpostmaster.co.uk> wrote in
    message
    > > > > news:eO9GBgBXDHA.2200@TK2MSFTNGP09.phx.gbl...
    > > > > I setup a asp.net project running on [url]http://localhost/[/url] which
    connects
    > to
    > > a
    > > > > database on another server running sqlserver...
    > > > >
    > > > > I was able to connect to the database and create my application no
    > > > problem.
    > > > >
    > > > > The sqlserver database server had windows 2000 without any SP's or
    > > > updates.
    > > > > This was no problem and even though the OS hadn't the .net framework
    > > > > installed, everything worked fine.
    > > > >
    > > > > the requirements for that sqlserver database server have since
    > changed,
    > > > and
    > > > > windows update was visited to get all the updates, including the
    > latest
    > > > SP's
    > > > > as well as the .net framework. I also installed the remote only
    > > debugging
    > > > > for VS.net on this server so that I'm also able to use this as a IIS
    > > > > server...
    > > > >
    > > > > Anyway, back to my problem, since these updates the asp.net
    > application
    > > i
    > > > > run from my machine, whcih connects to this database server, has
    > stopped
    > > > > working with error "SQL Server does not exist or access denied" on
    the
    > > > line
    > > > > where the .Open() is called on the ADO.net database connection
    object.
    > > > >
    > > > > Any ideas???
    > > > >
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Benny Tordrup Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139