473,395 Members | 1,457 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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???
Nov 17 '05 #1
5 1926
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: arabub | last post by:
I have an installation of Apache that apparently includes PHP (out of the box Redhat 9.0). If I make database calls to Postgresql, as what user is that call going to be made? The user that...
9
by: Mike Preston | last post by:
IE 6.0 (not interested in other browsers at the moment) I have looked everywhere I can find to look and googled until I am cross-eyed and am hoping somebody knows what I'm doing wrong. I have...
5
by: news | last post by:
Well, I wrote my first PHP class today. Yeah! But to get it to work, in each function within the class I have to repeat the database connection lines, and that just seems redundant; there has to...
5
by: mghale | last post by:
Hi, I wanted to know if there is a way in DB2 UDB/AIX v. 8.2.2 to activate/start a database in a single user mode similar to how you can start the entire instance in Admin Mode. I want to...
3
by: Dave F. | last post by:
I am using ODBC to connect to dBase data on a remote server. The ASP.NET app will be running on Win 2k or 2003 server. I have tried to make it work but all I can get is an error. ...
13
by: Christopher Cashell | last post by:
Yesterday, while attempting to access a database, I received errors saying that the database was innaccessible. After investigating a little, I found the following in the PostgreSQL log files: ...
1
by: SimonZ | last post by:
I have connection string: <add key="appStrConnection" value="Password=readP; User ID=reader;Initial Catalog=CP; Data Source=nl-si-comp1"/> but I can't connect to my database: "SQL Server does...
8
by: =?Utf-8?B?ZGF2aWQ=?= | last post by:
Now we have some trouble to directly access to SQL Server database. I would like to know if there is a special protocol in the communication between SQL SERVER client and databse system. What is...
1
by: Zuggy | last post by:
I'm trying to create a registration/login script using Access 2003. I'm using ADOdb to connect through ODBC. <?php // Connects to your Database include('adodb/adodb.inc.php'); # load code...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.