473,748 Members | 6,034 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1955
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************ **@MAILpostmast er.co.uk> wrote in message
news:eO******** ******@TK2MSFTN GP09.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******** *****@TK2MSFTNG P10.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************ **@MAILpostmast er.co.uk> wrote in message
news:eO******** ******@TK2MSFTN GP09.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************ **@MAILpostmast er.co.uk> skrev i en meddelelse
news:eO******** ******@TK2MSFTN GP09.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******** ********@TK2MSF TNGP09.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************ **@MAILpostmast er.co.uk> wrote in message
news:u6******** ******@tk2msftn gp13.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******** *****@TK2MSFTNG P10.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************ **@MAILpostmast er.co.uk> wrote in message
news:eO******** ******@TK2MSFTN GP09.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_grantdbacces s '<ComputerName> \ASPNET'
go

exec sp_addrolemembe r @rolename='db_o wner', @membername=
'<ComputerName> \ASPNET'
go
</SQL>

Best regards,

Benny Tordrup

"Daniel Bass" <da************ **@MAILpostmast er.co.uk> skrev i en meddelelse
news:uI******** ******@tk2msftn gp13.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******** ********@TK2MSF TNGP09.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************ **@MAILpostmast er.co.uk> wrote in message
news:u6******** ******@tk2msftn gp13.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******** *****@TK2MSFTNG P10.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************ **@MAILpostmast er.co.uk> wrote in message > news:eO******** ******@TK2MSFTN GP09.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
2124
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 Apache is running as? Can I specify the user that the call is to be made as? Thanks, --Ulf
9
3253
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 an HTML application (.hta) working fine, except one thing. I'm trying to write to a local database from a .htm window (opened from the main .hta window) and it doesn't work with any of the combinations I've tried (and I admit to having tried a...
5
3025
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 be a better way that I'm just not bright enough to think of. Any suggestions? (It's the first 3 lines of each of the two functions below. When I have it fully written, there will be about 10 similar functions, each repeating those three lines.)
5
5717
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 take a database offline. I use the force command but there are apps that constantly try to reconnect. I want to set the database to only allow an admin to access it to run my tasks.
3
6714
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. System.Data.Odbc.OdbcException: ERROR '(unknown)' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides. ERROR Driver's SQLSetConnectAttr failed ERROR '(unknown)' is not...
13
3141
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: 2004-06-30 08:30:19 LOG: checkpoint process (PID 28423) was terminated by signal 11 2004-06-30 08:30:19 LOG: terminating any other active server processes 2004-06-30 08:30:19 WARNING: terminating connection because of crash of another...
1
1244
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 not exist or access denied" is the error message. If I connect with query analyzer or SQL Enerprise it works, only from aspx page won't work.
8
1677
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 the messaging pattern? Thank you for any help. David
1
3182
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 common to ADOdb $db = &ADONewConnection('access'); # create a connection $db->PConnect('evdb'); # connect to MS-Access, evdb DSN $db->debug = true; //This code runs if the form has been submitted
0
8991
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8830
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9541
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9370
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9321
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9247
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8242
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2782
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.