By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,677 Members | 1,070 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,677 IT Pros & Developers. It's quick & easy.

ASP.NET database won't connect...

P: n/a
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???
Nov 17 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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" <da**************@MAILpostmaster.co.uk> wrote in message
news:eO**************@TK2MSFTNGP09.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???

Nov 17 '05 #2

P: n/a
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]" <BA************@sympatico.ca> wrote in message
news:OD*************@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" <da**************@MAILpostmaster.co.uk> wrote in message
news:eO**************@TK2MSFTNGP09.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???

Nov 17 '05 #3

P: n/a
Daniel,

What does your connection string look like?

Benny Tordrup
"Daniel Bass" <da**************@MAILpostmaster.co.uk> skrev i en meddelelse
news:eO**************@TK2MSFTNGP09.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???

Nov 17 '05 #4

P: n/a
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" <ke***@takempis.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Your server explorer runs under a different account than ASP.Net.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
http://www.takempis.com
Complex things are made up of
lots of simple things.

"Daniel Bass" <da**************@MAILpostmaster.co.uk> wrote in message
news:u6**************@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]" <BA************@sympatico.ca> wrote in message
news:OD*************@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" <da**************@MAILpostmaster.co.uk> wrote in message
news:eO**************@TK2MSFTNGP09.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???



Nov 17 '05 #5

P: n/a
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" <da**************@MAILpostmaster.co.uk> skrev i en meddelelse
news:uI**************@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" <ke***@takempis.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Your server explorer runs under a different account than ASP.Net.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
http://www.takempis.com
Complex things are made up of
lots of simple things.

"Daniel Bass" <da**************@MAILpostmaster.co.uk> wrote in message
news:u6**************@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]" <BA************@sympatico.ca> wrote in message news:OD*************@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" <da**************@MAILpostmaster.co.uk> wrote in message > news:eO**************@TK2MSFTNGP09.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???
>
>
>



Nov 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.