Professional Web Applications Themes

ASP.NET database won't connect... - Microsoft SQL / MS SQL Server

I setup a asp.net project running on http://localhost/ 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 ...

  1. #1

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

    I setup a asp.net project running on http://localhost/ 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 Guest

  2. #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" <co.uk> wrote in message
    news:phx.gbl...
    I setup a asp.net project running on http://localhost/ 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 Guest

  3. #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]" <ca> wrote in message
    news:phx.gbl... 
    database. 
    has 
    problem. 
    updates. 
    and 
    SP's 
    line 


    Daniel Guest

  4. #4

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

    Daniel,

    What does your connection string look like?

    Benny Tordrup


    "Daniel Bass" <co.uk> skrev i en meddelelse
    news:phx.gbl... 
    problem. 
    updates. 
    and 
    SP's 
    line 


    Benny Guest

  5. #5

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

    Daniel,

    BTW, I did not notice the cross post. I answered in this group

    Benny


    "Benny Tordrup" <dk> skrev i en meddelelse
    news:#phx.gbl... 
    meddelelse [/ref]

    > problem. 
    > updates. 
    > and 
    > SP's [/ref]
    debugging [/ref]

    > line 
    >
    >[/ref]


    Benny Guest

  6. #6

    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" <com> wrote in message
    news:%phx.gbl... [/ref]
    it 
    > result. 
    > > database. [/ref][/ref]
    still [/ref][/ref]
    to 
    > > problem. 
    > > updates. [/ref][/ref]
    changed, [/ref][/ref]
    latest [/ref]
    > debugging [/ref][/ref]
    application [/ref][/ref]
    stopped 
    > > line 
    > >
    > >[/ref]
    >
    >[/ref]


    Daniel Guest

  7. #7

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

    Daniel,

    Apply the following commands in Query yzer (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" <co.uk> skrev i en meddelelse
    news:phx.gbl... [/ref]
    > it 
    > > result. [/ref][/ref]
    message [/ref]
    > still [/ref][/ref]
    message [/ref][/ref]
    connects [/ref]
    > changed, [/ref]
    > latest 
    > > debugging [/ref]
    > application [/ref]
    > stopped [/ref][/ref]
    the [/ref][/ref]
    object. 
    > >
    > >[/ref]
    >
    >[/ref]


    Benny Guest

Similar Threads

  1. how to connect to a database using asp
    By sjb34 in forum Dreamweaver AppDev
    Replies: 5
    Last Post: April 29th, 02:19 PM
  2. How to use “RDS.Connect” to connect to a MS Access database?
    By hannaman@msn.com in forum ASP Database
    Replies: 0
    Last Post: August 2nd, 11:09 PM
  3. How can I connect this database?
    By Birthday in forum ASP Database
    Replies: 9
    Last Post: April 19th, 02:55 AM
  4. ASP.NET database won't connect...
    By Daniel Bass in forum ASP.NET General
    Replies: 5
    Last Post: August 7th, 08:59 AM
  5. Connect to Web Database from VC++
    By Raghavendra in forum Microsoft SQL / MS SQL Server
    Replies: 0
    Last Post: July 16th, 06:11 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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